#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
#include "machine.h"
#include "bu.h"
Include dependency graph for malloc.c:
Go to the source code of this file.
Data Structures | |
struct | memdebug |
struct | memqdebug |
Defines | |
#define | MDB_MAGIC 0x12348969 |
#define | MEMDEBUG_NULL ((struct memdebug *)0) |
#define | MEMQDEBUG_NULL ((struct memqdebug *)0) |
Enumerations | |
enum | alloc_t { MALLOC, CALLOC } |
Functions | |
HIDDEN void | bu_memdebug_add (char *ptr, unsigned int cnt, const char *str) |
HIDDEN struct memdebug * | bu_memdebug_check (register char *ptr, const char *str) |
genptr_t | bu_malloc (unsigned int cnt, const char *str) |
genptr_t | bu_calloc (unsigned int nelem, unsigned int elsize, const char *str) |
void | bu_free (genptr_t ptr, const char *str) |
genptr_t | bu_realloc (register genptr_t ptr, unsigned int cnt, const char *str) |
void | bu_prmem (const char *str) |
char * | bu_strdupm (register const char *cp, const char *label) |
char * | bu_dirname (const char *cp) |
int | bu_malloc_len_roundup (register int nbytes) |
void | bu_ck_malloc_ptr (genptr_t ptr, const char *str) |
int | bu_mem_barriercheck () |
void | bu_free_array (int argc, char *argv[], const char *str) |
Variables | |
int | bu_debug = 0 |
long | bu_n_malloc = 0 |
long | bu_n_free = 0 |
long | bu_n_realloc = 0 |
const char | bu_strdup_message [] = "bu_strdup string" |
const char | bu_vls_message [] |
The bu_malloc() routines can't use bu_log() because that uses the bu_vls() routines which depend on bu_malloc(). So it goes direct to stderr, semaphore protected.
Christopher Sean Morrison
Definition in file malloc.c.