stdlib.h
Go to the documentation of this file.
1
9
/*
10
* The contents of this file are subject to the Mozilla Public License
11
* Version 1.0 (the "License"); you may not use this file except in
12
* compliance with the License. You may obtain a copy of the License
13
* at http://www.mozilla.org/MPL/
14
*
15
* Software distributed under the License is distributed on an "AS IS"
16
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17
* the License for the specific language governing rights and
18
* limitations under the License.
19
*
20
* The Original Code is legOS code, released October 17, 1999.
21
*
22
* The Initial Developer of the Original Code is Markus L. Noga.
23
* Portions created by Markus L. Noga are Copyright (C) 1999
24
* Markus L. Noga. All Rights Reserved.
25
*
26
* Contributor(s): Markus L. Noga <markus@noga.de>
27
*/
28
29
#ifndef __stdlib_h__
30
#define __stdlib_h__
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
36
#include <
mem.h
>
37
39
//
40
// Functions
41
//
43
44
//
45
// Standard memory management.
46
// See the Linux man pages for details.
47
//
48
50
61
extern
void
*
calloc
(
size_t
nmemb,
size_t
size);
62
64
70
extern
void
*
malloc
(
size_t
size);
71
73
80
extern
void
free
(
void
*ptr);
81
83
86
extern
long
int
random
(
void
);
88
96
extern
void
srandom
(
unsigned
int
seed);
97
98
#ifdef __cplusplus
99
}
100
#endif
101
102
#endif // __stdlib_h__
free
void free(void *ptr)
return the allocated memory to memory management.
malloc
void * malloc(size_t size)
allocate and return pointer to uninitialized memory
calloc
void * calloc(size_t nmemb, size_t size)
allocate and return pointer to initialized memory
srandom
void srandom(unsigned int seed)
seed the random number generator
mem.h
Interface: memory data types.
random
long int random(void)
generate a random number
brickOS
is released under the
Mozilla Public License
.
Original code copyright 1998-2005 by the authors.
Generated for brickOS C by
1.8.16