Borland C++ reference

coreleft

raw OCR

Returns a measure of unused RAM memory.

Defined in header <alloc.h>

Syntax

In the tiny, small,and medium models:
#include <alloc.h>
unsigned  coreleft(void);

In the compact, large, and huge models:
#include <alloc.h>
unsigned  long  coreleft(void);

Portability

DOSUNIXWindowsANSI CC++ only
■

Remarks

coreleft returns a measure of RAM memory not in use. It gives a different measurement value, depending on whether the memory model is of the small data group or the large data group.

Return value

In the small data models, coreleft returns the amount of unused memory between the top of the heap and the stack. In the large data models, coreleft returns the amount of memory between the highest allocated block and the end of available memory.

See also

Example

#include <stdio.h>
iinclude <alloc.h>

int main(void)

   printfC'The difference between the highest allocated block  and\n");
   printfC'the top of the heap is: %lu bytes\n",  (unsigned long) corelefti
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.