#include <assert.h>#include <sys/types.h>Go to the source code of this file.
Defines | |
| #define | SAFE_MEM 5 | 
Functions | |
| void | agent_zap (T &x) | 
| void | agent_zaparr (T &x) | 
| T* | agent_new (T **dest) | 
| T* | agent_newarr (T **dest, size_t size) | 
Definition in file memory.h.
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 
 Definition at line 79 of file memory.cpp. Referenced by Thread::Thread(), protocolHandler::add(), and main(). 
 00080 {
00081     *dest = new T;
00082     return *dest;
00083 }
 | 
  
      
  | 
  
| 
 
 Definition at line 61 of file memory.cpp. Referenced by debug_agent(). 
 00062 {
00063     {assert(size > 0);}
00064     //add a pad, for security
00065     size_t tmpii = size + SAFE_MEM;
00066     *dest = new T[tmpii];
00067     //clear it
00068     memset(*dest, 0, tmpii);
00069     return *dest;
00070 }
 | 
  
      
  | 
  
| 
 
 Definition at line 33 of file memory.cpp. Referenced by main(). 
 00034 {
00035     {assert(x != NULL);}
00036     delete x;
00037     x = NULL;
00038 }
 | 
  
      
  | 
  
| 
 
 Definition at line 46 of file memory.cpp. Referenced by protocolHandler::next(). 
 00047 {
00048     {assert(x != NULL);}
00049     delete [] x;
00050     x = NULL;
00051 }
 | 
  
1.2.8.1 written by Dimitri van Heesch,
 © 1997-2001