From eee86e627b670b153bb5a0f41f9f8dfa4c378884 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 28 Jun 2018 09:25:18 -0400 Subject: Extract memarea into its own library --- src/common/memarea.h | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/common/memarea.h (limited to 'src/common/memarea.h') diff --git a/src/common/memarea.h b/src/common/memarea.h deleted file mode 100644 index 7dc7ec1fed..0000000000 --- a/src/common/memarea.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2018, 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); -#define memarea_drop_all(area) \ - do { \ - memarea_drop_all_(area); \ - (area) = NULL; \ - } while (0) -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_assert_ok(memarea_t *area); - -#endif /* !defined(TOR_MEMAREA_H) */ - -- cgit v1.2.3-54-g00ecf