Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

dmalloc.h File Reference

Go to the source code of this file.

Functions

void * dmalloc (size_t size, char *message, char *file)
 Allocate memory (using malloc), and log a message into a log file.

int dfree (void *p, char *message, char *file)
 Free allocated memory (using free), and log a message into a log file.


Detailed Description

Header file for dmalloc.c.

Definition in file dmalloc.h.


Function Documentation

int dfree void *    p,
char *    message,
char *    file
 

Free allocated memory (using free), and log a message into a log file.

Parameters:
p Pointer to the start of the memory location to free.
message Pointer to a zero terminated string of characters that contains the message to log.
file Name of the log file.
Returns:
The function returns 0 if success, otherwise the function returns 1 (this means that the system is running out of memory).

Definition at line 60 of file dmalloc.c.

References my_logger().

void* dmalloc size_t    size,
char *    message,
char *    file
 

Allocate memory (using malloc), and log a message into a log file.

Parameters:
size Number of bytes to allocate.
message Pointer to a zero terminated string of characters that contains the message to log.
file Name of the log file.
Returns:
This function returns the pointer allocated (via malloc), or NULL if the system is running out of memory.

Definition at line 18 of file dmalloc.c.

References my_logger().


Generated on Thu Apr 3 16:23:45 2003 for Common_C_libraries by doxygen1.3-rc1