File: alloc_utils_private.h

package info (click to toggle)
librtr 0.8.0-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,624 kB
  • sloc: ansic: 9,862; perl: 5,146; makefile: 177; sh: 109
file content (34 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * This file is part of RTRlib.
 *
 * This file is subject to the terms and conditions of the MIT license.
 * See the file LICENSE in the top level directory for more details.
 *
 * Website: http://rtrlib.realmv6.org/
 */

#ifndef LRTR_ALLOC_UTILS_PRIVATE_H
#define LRTR_ALLOC_UTILS_PRIVATE_H

#include "alloc_utils.h"

#include <stdlib.h>

void *lrtr_malloc(size_t size);

void *lrtr_calloc(size_t nmemb, size_t size);

void lrtr_free(void *ptr);

void *lrtr_realloc(void *ptr, size_t size);

/**
 * @brief Duplicates a string
 * @pre string != NULL
 * @param[in] string
 * @returns Duplicated string
 * @returns NULL on error
 */
char *lrtr_strdup(const char *string);

#endif