Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   pmNoMem    ( 3 )

сообщить о нехватке памяти (report out of memory conditions)

   Дубль

(статьи: pmnomem - сообщить о нехватке памяти )

Имя (Name)

pmNoMem - report out of memory conditions


Синопсис C (C Synopsis)

#include <pcp/pmapi.h>

void pmNoMem(const char *where, size_t size, int fatal);

cc ... -lpcp


Описание (Description)

pmNoMem is a convenience method that may be used when malloc(3) or a related memory allocation service fails.

A standard message is emitted using pmNotifyErr(3) with where used as a message prefix and the failing allocation size is also reported.

If fatal is zero (and PM_RECOV_ERR is zero), pmNoMem returns (the allocation failure is assumed to be recoverable by the caller), else (and PM_FATAL_ERR is a good value to use in this case) exit(2) is called with an argument of 1.


Смотри также (See also)

exit(2), malloc(3), PMAPI(3) and pmNotifyErr(3).