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 void *silc_malloc(size_t size)
31 void *silc_calloc(size_t items, size_t size)
34 addr = calloc(items, size);
39 void *silc_realloc(void *ptr, size_t size)
42 addr = realloc(ptr, size);
47 void silc_free(void *ptr)
52 void *silc_memdup(const void *ptr, size_t size)
54 unsigned char *addr = silc_malloc(size + 1);
56 memcpy((void *)addr, ptr, size);