How can I determine the available memory for the application?


The Blue Gene runtime system provides the function call rts_getavailablememory(). To use this the application must include the rts.h header file.

The prototype of the function call is:
extern int rts_getavailablememory(size_t* availableMemory);

Parameters:

  • availableMemory: number of bytes that the brk pointer can be moved
  • return value: 0 on success, <> 0 on failure

Warning: Since the stack is dynamic, the amount of memory available at any point of time is a function of the current stack pointer!


last change 17.09.2007 | Jutta Docter | Print