5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 1999 - 2002 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
21 #include "silcincludes.h"
23 #ifndef SILC_STACKTRACE
25 void *silc_malloc(size_t size)
33 void *silc_calloc(size_t items, size_t size)
36 addr = calloc(items, size);
41 void *silc_realloc(void *ptr, size_t size)
44 addr = realloc(ptr, size);
49 void silc_free(void *ptr)
54 void *silc_memdup(const void *ptr, size_t size)
56 unsigned char *addr = silc_malloc(size + 1);
58 memcpy((void *)addr, ptr, size);
63 #endif /* !SILC_STACKTRACE */