1 | /* $Id: shheap.h 2416 2010-09-14 00:30:30Z bird $ */
|
---|
2 | /** @file
|
---|
3 | * The shell memory heap methods.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (c) 2009-2010 knut st. osmundsen <[email protected]>
|
---|
8 | *
|
---|
9 | *
|
---|
10 | * This file is part of kBuild.
|
---|
11 | *
|
---|
12 | * kBuild is free software; you can redistribute it and/or modify
|
---|
13 | * it under the terms of the GNU General Public License as published by
|
---|
14 | * the Free Software Foundation; either version 2 of the License, or
|
---|
15 | * (at your option) any later version.
|
---|
16 | *
|
---|
17 | * kBuild is distributed in the hope that it will be useful,
|
---|
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
20 | * GNU General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with kBuild; if not, write to the Free Software
|
---|
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
25 | *
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef ___shheap_h
|
---|
29 | #define ___shheap_h
|
---|
30 |
|
---|
31 | #include "shtypes.h"
|
---|
32 |
|
---|
33 | /* heap */
|
---|
34 | int shheap_init(void *phead);
|
---|
35 | void *shheap_get_head(void);
|
---|
36 | int shheap_fork_copy_to_child(void *);
|
---|
37 |
|
---|
38 | void *sh_malloc(shinstance *, size_t);
|
---|
39 | void *sh_calloc(shinstance *, size_t, size_t);
|
---|
40 | void *sh_realloc(shinstance *, void *, size_t);
|
---|
41 | char *sh_strdup(shinstance *, const char *);
|
---|
42 | void sh_free(shinstance *, void *);
|
---|
43 |
|
---|
44 | #endif
|
---|
45 |
|
---|