PK_MEMORY_set_block_size   

PK_ERROR_code_t PK_MEMORY_set_block_size
(
--- received arguments ---
size_t          size  --- required default block size
)


This function sets the size of the smallest block of memory that Parasolid
will request from FMALLO (PK_FMALLO_f_t) for modelling data.


See also Controlling memory allocation for more information.

The allowed sizes are approximately in the range of one eighth of a MByte to 16
MByte but the precise allowed values are platform dependent.  The default block
size is the minimum allowed block size for the platform.

If the requested 'size' is set to less than the minimum size for the platform,
then the smallest allowed block size for the platform will be used.  In
particular, giving an argument of zero will always re-instate the default.

If the requested 'size' is set to greater than the maximum size for the
platform then the maximum size for the platform will be used.

Moreover, for alignment reasons, not all sizes between the allowed minimum and
maximum are allowed.  Parasolid will set the block size to the largest allowed
block size that is less than or equal to the requested block size.

The actual smallest block size in effect at any time may be enquired by calling
PK_MEMORY_ask_block_size.

Any blocks already allocated when this function is called are unaffected by the
call.

SESSION considerations:

  - the function may be called at any time, whether or not the modeller is
    started.

  - starting the modeller causes Parasolid to allocate several blocks of
    memory, so if all blocks are to be of a required minimum size then the
    call to PK_MEMORY_set_block_size must precede the call to
    PK_SESSION_start.

  - Parasolid can not be started unless 6 blocks of the current block size can
    be allocated.

  - stopping the modeller (PK_SESSION_stop) reinstates the default block
    size which is the smallest allowed block size for the platform.

  - some modelling operations require extra separate memory blocks so it is
    recommended that the requested block size be kept well below an eighth
    of the maximum space available.

  - the block size set with this function is applied session-wide. There is
    no facility to set a thread-specific block size.