tor/src/common/memarea.h
Nick Mathewson c4b8fef362 Remove svn $Id$s from our source, and remove tor --version --version.
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed.  They were not actually useful for
telling the version of Tor files in the wild.

svn:r17867
2009-01-04 00:35:51 +00:00

26 lines
845 B
C

/* Copyright (c) 2008, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/* Tor dependencies */
#ifndef _TOR_MEMAREA_H
#define _TOR_MEMAREA_H
typedef struct memarea_t memarea_t;
memarea_t *memarea_new(void);
void memarea_drop_all(memarea_t *area);
void memarea_clear(memarea_t *area);
int memarea_owns_ptr(const memarea_t *area, const void *ptr);
void *memarea_alloc(memarea_t *area, size_t sz);
void *memarea_alloc_zero(memarea_t *area, size_t sz);
void *memarea_memdup(memarea_t *area, const void *s, size_t n);
char *memarea_strdup(memarea_t *area, const char *s);
char *memarea_strndup(memarea_t *area, const char *s, size_t n);
void memarea_get_stats(memarea_t *area,
size_t *allocated_out, size_t *used_out);
void memarea_clear_freelist(void);
void memarea_assert_ok(memarea_t *area);
#endif