[mercury-users] Clarification..........

Ralph Becket rafe at cs.mu.OZ.AU
Tue Nov 12 07:45:14 AEDT 2002


Noel  Pinto, Monday, 11 November 2002:
> Hi,
> 
> The foldoc does not have the meaning for heap space. Heap space is 
> mentioned in io__preallocate_heap_space.

Which version of the compiler are you using?  io__preallocate_heap_space
is not even mentioned in the current ROTD io module.  Even if it were,
with a name like that I'd lay money on it not being exported from the
interface section.

> What I am guessing is heap space is the memmory allocated for a 
> particular purpose or for a overall performance of a function.

The heap is a pool of memory which is allocated on an as-needed basis
to hold new values.  Pretty much every time you construct a new value,
the space to hold it is taken from the heap (values that fit in a 
single machine register, such as ints, are an exception.)  When the
heap is used up, a process called garbage collection (look it up) is
used to reclaim all the space in the heap that is holding dead values
(i.e. values that can no longer be reached from any live data in the
program.)

- Ralph
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list