[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  BLIMEMPAK        (Clipper Summer '87)
------------------------------------------------------------------------------

  Function : Pack Clipper Summer '87 memory pool.

  Syntax   : nuValue = BLIMEMPAK([nuFrequency | -1])

  Return   : Memory Pack Frequency

  This function is used to get or set the frequency of procedure calls
  with which the Blinker overlay manager packs free dynamic memory to
  reduce fragmentation, returns the previous pack frequency, and takes an
  optional parameter of the new frequency to set it to.

  Blinker defaults to maximum speed and a setting of zero for the
  frequency, which means it performs no automatic packing of free dynamic
  memory to prevent fragmentation. Blinker may be told to automatically
  pack memory after every n procedure calls, either at link time using the
  BLINKER MEMORY PACK command (see chapter 6 for further information) or
  at application runtime using the BLIMEMPAK() function.

  The effect of this function depends on the value of the parameter
  passed, but it always returns the current pack frequency, i.e. the
  Blinker overlay manager will pack free dynamic memory every time this
  number of procedures has been called.

  If no parameter is specified then no action will be taken by the function.

  If a parameter value of -1 is passed, the overlay manager performs a
  memory pack immediately and leaves the pack frequency unchanged. This is
  particularly useful following a call to BLIOVLCLR() to clear inactive
  overlays before DBEDIT, MEMOEDIT, reindexing and other memory intensive
  routines.

  A parameter of 0 switches off the memory packing altogether, and any
  other value sets the packing frequency to that value.

  If automatic memory packing is not enabled using the BLINKER MEMORY PACK
  command at link time, then performing a BLIMEMPAK(-1) at the start of
  the program can often make a significant difference to memory
  fragmentation. The reason for this is that even by the time the first
  line of the Clipper program has been reached a large number of dynamic
  memory allocations and releases have already been performed, so memory
  can already be partially fragmented.

  Example  :
  *  Get the BLINKER memory pack frequency
  *
  ? "Packing currently occurs after every "
  ?? BLIMEMPAK(), " calls"
  *
  * Set to every 10 procedure calls
  *
  BLIMEMPAK(10)

See Also: BLINKER MEMORY PACK BLIOVLCLR()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson