diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2009-05-22 21:58:48 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2009-05-22 21:58:48 +0000 |
commit | 513389b4c1bc8afe4b2dc9947c534bfeb105e3da (patch) | |
tree | 10e673b35651ac567fed2eda0c679c7ade64cbc6 /apps/plugins/pdbox/dbestfit-3.3/malloc.man | |
parent | 95fa7f6a2ef466444fbe3fe87efc6d5db6b77b36 (diff) | |
download | rockbox-513389b4c1bc8afe4b2dc9947c534bfeb105e3da.tar.gz rockbox-513389b4c1bc8afe4b2dc9947c534bfeb105e3da.zip |
Add FS #10214. Initial commit of the original PDa code for the GSoC Pure Data plugin project of Wincent Balin. Stripped some non-sourcefiles and added a rockbox readme that needs a bit more info from Wincent. Is added to CATEGORIES and viewers, but not yet to SUBDIRS (ie doesn't build yet)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21044 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/dbestfit-3.3/malloc.man')
-rw-r--r-- | apps/plugins/pdbox/dbestfit-3.3/malloc.man | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/dbestfit-3.3/malloc.man b/apps/plugins/pdbox/dbestfit-3.3/malloc.man new file mode 100644 index 0000000000..79f6f3ea37 --- /dev/null +++ b/apps/plugins/pdbox/dbestfit-3.3/malloc.man | |||
@@ -0,0 +1,190 @@ | |||
1 | MALLOC(3V) C LIBRARY FUNCTIONS MALLOC(3V) | ||
2 | |||
3 | |||
4 | NAME | ||
5 | malloc, free, realloc, calloc | ||
6 | |||
7 | SYNOPSIS | ||
8 | #include <malloc.h> | ||
9 | |||
10 | void *malloc(size) | ||
11 | size_t size; | ||
12 | |||
13 | void free(ptr) | ||
14 | void *ptr; | ||
15 | |||
16 | void *realloc(ptr, size) | ||
17 | void *ptr; | ||
18 | size_t size; | ||
19 | |||
20 | void *calloc(nelem, elsize) | ||
21 | size_t nelem; | ||
22 | size_t elsize; | ||
23 | |||
24 | DESCRIPTION | ||
25 | These routines provide a general-purpose memory allocation | ||
26 | package. They maintain a table of free blocks for efficient | ||
27 | allocation and coalescing of free storage. When there is no | ||
28 | suitable space already free, the allocation routines call | ||
29 | rn_getseg() to get more memory from the system. | ||
30 | |||
31 | Each of the allocation routines returns a pointer to space | ||
32 | suitably aligned for storage of any type of object. Each | ||
33 | returns a NULL pointer if the request cannot be completed | ||
34 | (see DIAGNOSTICS). | ||
35 | |||
36 | malloc() returns a pointer to a block of at least size | ||
37 | bytes, which is appropriately aligned. | ||
38 | |||
39 | free() releases a previously allocated block. Its argument | ||
40 | is a pointer to a block previously allocated by malloc(), | ||
41 | calloc() or realloc(). | ||
42 | |||
43 | realloc() changes the size of the block referenced by ptr to | ||
44 | size bytes and returns a pointer to the (possibly moved) | ||
45 | block. The contents will be unchanged up to the lesser of | ||
46 | the new and old sizes. If unable to honor a reallocation | ||
47 | request, realloc() leaves its first argument unaltered. | ||
48 | |||
49 | **** DMALLOC DOES NOT COMPLY WITH THE PARAGRAPH BELOW **** | ||
50 | |||
51 | For backwards compatibility, realloc() accepts a pointer to a | ||
52 | block freed since the most recent call to malloc(), cal- | ||
53 | loc() or realloc(). | ||
54 | |||
55 | Note: using realloc() with a block freed before the most recent | ||
56 | call to malloc(), calloc() or realloc() is an error. | ||
57 | |||
58 | calloc() uses malloc() to allocate space for an array of | ||
59 | nelem elements of size elsize, initializes the space to | ||
60 | zeros, and returns a pointer to the initialized block. The | ||
61 | block should be freed with free(). | ||
62 | |||
63 | |||
64 | malloc() and realloc() return a non- NULL pointer if size is 0, | ||
65 | and calloc() returns a non-NULL pointer if nelem or elsize is 0, | ||
66 | but these pointers should not be dereferenced. | ||
67 | |||
68 | Note: Always cast the value returned by malloc(), realloc() or | ||
69 | calloc(). | ||
70 | |||
71 | |||
72 | RETURN VALUES On success, malloc(), calloc() and realloc() return a | ||
73 | pointer to space suitably aligned for storage of any type of | ||
74 | object. On failure, they return NULL. | ||
75 | |||
76 | free() does not return a value. | ||
77 | |||
78 | |||
79 | NOTES | ||
80 | Because malloc() and realloc() return a non-NULL pointer if size | ||
81 | is 0, and calloc() returns a non-NULL pointer if nelem or elsize | ||
82 | is 0, a zero size need not be treated as a special case if it | ||
83 | should be passed to these functions unpredictably. Also, the | ||
84 | pointer returned by these functions may be passed to subsequent | ||
85 | invocations of realloc(). | ||
86 | |||
87 | |||
88 | BUGS | ||
89 | |||
90 | **** DMALLOC DOES NOT COMPLY WITH THE PARAGRAPH BELOW **** | ||
91 | |||
92 | Since realloc() accepts a pointer to a block freed since the last | ||
93 | call to malloc(), calloc() or realloc(), a degradation of | ||
94 | performance results. The semantics of free() should be changed | ||
95 | so that the contents of a previously freed block are undefined. | ||
96 | MALLOC(3V) C LIBRARY FUNCTIONS MALLOC(3V) | ||
97 | |||
98 | |||
99 | NAME | ||
100 | malloc, free, realloc, calloc | ||
101 | |||
102 | SYNOPSIS | ||
103 | #include <malloc.h> | ||
104 | |||
105 | void *malloc(size) | ||
106 | size_t size; | ||
107 | |||
108 | void free(ptr) | ||
109 | void *ptr; | ||
110 | |||
111 | void *realloc(ptr, size) | ||
112 | void *ptr; | ||
113 | size_t size; | ||
114 | |||
115 | void *calloc(nelem, elsize) | ||
116 | size_t nelem; | ||
117 | size_t elsize; | ||
118 | |||
119 | DESCRIPTION | ||
120 | These routines provide a general-purpose memory allocation | ||
121 | package. They maintain a table of free blocks for efficient | ||
122 | allocation and coalescing of free storage. When there is no | ||
123 | suitable space already free, the allocation routines call | ||
124 | rn_getseg() to get more memory from the system. | ||
125 | |||
126 | Each of the allocation routines returns a pointer to space | ||
127 | suitably aligned for storage of any type of object. Each | ||
128 | returns a NULL pointer if the request cannot be completed | ||
129 | (see DIAGNOSTICS). | ||
130 | |||
131 | malloc() returns a pointer to a block of at least size | ||
132 | bytes, which is appropriately aligned. | ||
133 | |||
134 | free() releases a previously allocated block. Its argument | ||
135 | is a pointer to a block previously allocated by malloc(), | ||
136 | calloc() or realloc(). | ||
137 | |||
138 | realloc() changes the size of the block referenced by ptr to | ||
139 | size bytes and returns a pointer to the (possibly moved) | ||
140 | block. The contents will be unchanged up to the lesser of | ||
141 | the new and old sizes. If unable to honor a reallocation | ||
142 | request, realloc() leaves its first argument unaltered. | ||
143 | |||
144 | **** DMALLOC DOES NOT COMPLY WITH THE PARAGRAPH BELOW **** | ||
145 | |||
146 | For backwards compatibility, realloc() accepts a pointer to a | ||
147 | block freed since the most recent call to malloc(), cal- | ||
148 | loc() or realloc(). | ||
149 | |||
150 | Note: using realloc() with a block freed before the most recent | ||
151 | call to malloc(), calloc() or realloc() is an error. | ||
152 | |||
153 | calloc() uses malloc() to allocate space for an array of | ||
154 | nelem elements of size elsize, initializes the space to | ||
155 | zeros, and returns a pointer to the initialized block. The | ||
156 | block should be freed with free(). | ||
157 | |||
158 | |||
159 | malloc() and realloc() return a non- NULL pointer if size is 0, | ||
160 | and calloc() returns a non-NULL pointer if nelem or elsize is 0, | ||
161 | but these pointers should not be dereferenced. | ||
162 | |||
163 | Note: Always cast the value returned by malloc(), realloc() or | ||
164 | calloc(). | ||
165 | |||
166 | |||
167 | RETURN VALUES On success, malloc(), calloc() and realloc() return a | ||
168 | pointer to space suitably aligned for storage of any type of | ||
169 | object. On failure, they return NULL. | ||
170 | |||
171 | free() does not return a value. | ||
172 | |||
173 | |||
174 | NOTES | ||
175 | Because malloc() and realloc() return a non-NULL pointer if size | ||
176 | is 0, and calloc() returns a non-NULL pointer if nelem or elsize | ||
177 | is 0, a zero size need not be treated as a special case if it | ||
178 | should be passed to these functions unpredictably. Also, the | ||
179 | pointer returned by these functions may be passed to subsequent | ||
180 | invocations of realloc(). | ||
181 | |||
182 | |||
183 | BUGS | ||
184 | |||
185 | **** DMALLOC DOES NOT COMPLY WITH THE PARAGRAPH BELOW **** | ||
186 | |||
187 | Since realloc() accepts a pointer to a block freed since the last | ||
188 | call to malloc(), calloc() or realloc(), a degradation of | ||
189 | performance results. The semantics of free() should be changed | ||
190 | so that the contents of a previously freed block are undefined. | ||