coan 4.2.4
memory.h
Go to the documentation of this file.
00001 #ifndef MEMORY_H
00002 #define MEMORY_H
00003 /***************************************************************************
00004  *   Copyright (C) 2004, 2006 Symbian Software Ltd.                        *
00005  *   All rights reserved.                                                  *
00006  *   Copyright (C) 2007-2011 Mike Kinghan, imk@strudl.org                  *
00007  *   All rights reserved.                                                  *
00008  *                                                                         *
00009  *   Contributed originally by Mike Kinghan, imk@strudl.org                *
00010  *                                                                         *
00011  *   Redistribution and use in source and binary forms, with or without    *
00012  *   modification, are permitted provided that the following conditions    *
00013  *   are met:                                                              *
00014  *                                                                         *
00015  *   Redistributions of source code must retain the above copyright        *
00016  *   notice, this list of conditions and the following disclaimer.         *
00017  *                                                                         *
00018  *   Redistributions in binary form must reproduce the above copyright     *
00019  *   notice, this list of conditions and the following disclaimer in the   *
00020  *   documentation and/or other materials provided with the distribution.  *
00021  *                                                                         *
00022  *   Neither the name of Symbian Software Ltd. nor the names of its        *
00023  *   contributors may be used to endorse or promote products derived from  *
00024  *   this software without specific prior written permission.              *
00025  *                                                                         *
00026  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   *
00027  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     *
00028  *   LIMITED TO, THE IMPLIED WARRANTIES OF  MERCHANTABILITY AND FITNESS    *
00029  *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE        *
00030  *   COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,   *
00031  *   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,  *
00032  *   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS *
00033  *   OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED    *
00034  *   AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,*
00035  *   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF *
00036  *   THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH  *
00037  *   DAMAGE.                                                               *
00038  *                                                                         *
00039  **************************************************************************/
00040 
00041 #include <stdlib.h>
00042 
00050 
00052 typedef char * heap_str;
00053 
00055 typedef char const * heap_str_const;
00056 
00058 extern void *
00059 allocate(size_t bytes);
00060 
00062 void *
00063 zallocate(size_t bytes);
00064 
00066 extern void *
00067 reallocate(void *ptr, size_t bytes);
00068 
00070 extern void *
00071 callocate(size_t items, size_t size);
00072 
00079 extern void
00080 release(void **pp);
00081 
00092 extern void *
00093 clone(void const *src, size_t len);
00094 
00097 #endif /* EOF*/
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines