06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pREPC+ <strong>System</strong> <strong>Calls</strong> free<br />

free Deallocates memory.<br />

#include <br />

void free(<br />

void *ptr /* pointer to memory segment */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

See Also<br />

This function deallocates a specified memory segment (ptr). If the memory segment<br />

was not previously allocated by calloc(), malloc() or realloc(), or if the space<br />

has been deallocated by a call to free() or realloc(), the results are<br />

unpredictable.<br />

ptr Points to the memory segment to deallocate.<br />

This function does not return a value. If an error occurs, errno is set.<br />

Refer to Appendix B.<br />

free() calls the pSOS+ region manager to deallocate the memory.<br />

Callable From<br />

■ Task<br />

calloc, malloc, realloc<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 3-53<br />

3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!