#include "ObitThread.h"
#include <stdio.h>
#include <stdlib.h>
#include "memwatch.h"
Go to the source code of this file.
Functions | |
| void | ObitMemClassInit (void) |
| Public: Class initializer. | |
| gpointer | ObitMemAlloc (gulong size) |
| Public: allocate memory. | |
| gpointer | ObitMemAlloc0 (gulong size) |
| Public: allocate memory and zero fill. | |
| gpointer | ObitMemAllocName (gulong size, gchar *name) |
| Public: allocate memory giving name. | |
| gpointer | ObitMemAlloc0Name (gulong size, gchar *name) |
| Public: allocate memory and zero fill, giving name. | |
| gpointer | ObitMemRealloc (gpointer mem, gulong size) |
| Public: reallocate memory. | |
| gpointer | ObitMemFree (gpointer mem) |
| Public: deallocate. | |
| gboolean | ObitMemValid (gpointer mem) |
| Public: Check if in allocated block. | |
| void | ObitMemPrint (FILE *file) |
| Public: Print contents to file (e.g. | |
| void | ObitMemSummary (glong *number, glong *total) |
| Public: Summary of contents. | |
It is designed to minimize the chances of some of the more common c memory problems, especially freeing bad pointers or memory multiple times.
|
|
Public: allocate memory. Implementation used g_malloc
|
|
|
Public: allocate memory and zero fill. Implementation uses g_malloc0
|
|
||||||||||||
|
Public: allocate memory and zero fill, giving name. Implementation uses g_malloc0
|
|
||||||||||||
|
Public: allocate memory giving name. Initializes class if needed on first call. Implementation used g_malloc
|
|
|
Public: Class initializer.
|
|
|
Public: deallocate. This is a NOP if mem is not to a valid block of memory. Note: ONLY FREE MEMORY ALLOCATED BY ObitMem!!! Implementation used g_free
|
|
|
Public: Print contents to file (e.g. stdout)
|
|
||||||||||||
|
Public: reallocate memory.
|
|
||||||||||||
|
Public: Summary of contents.
|
|
|
Public: Check if in allocated block.
|
1.3.9.1