michael@0: /* $NetBSD: memcluster.h,v 1.1.1.1 2004/05/20 19:49:41 christos Exp $ */ michael@0: michael@0: /* michael@0: * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") michael@0: * Copyright (c) 1997,1999 by Internet Software Consortium. michael@0: * michael@0: * Permission to use, copy, modify, and distribute this software for any michael@0: * purpose with or without fee is hereby granted, provided that the above michael@0: * copyright notice and this permission notice appear in all copies. michael@0: * michael@0: * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES michael@0: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF michael@0: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR michael@0: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES michael@0: * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN michael@0: * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT michael@0: * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. michael@0: */ michael@0: michael@0: /* michael@0: * This version of this file is derived from Android 2.3 "Gingerbread", michael@0: * which contains uncredited changes by Android/Google developers. It has michael@0: * been modified in 2011 for use in the Android build of Mozilla Firefox by michael@0: * Mozilla contributors (including Michael Edwards , michael@0: * and Steve Workman ). michael@0: * These changes are offered under the same license as the original NetBSD michael@0: * file, whose copyright and license are unchanged above. michael@0: */ michael@0: michael@0: #ifndef MEMCLUSTER_H michael@0: #define MEMCLUSTER_H michael@0: michael@0: #include michael@0: michael@0: #define meminit __meminit michael@0: #ifdef MEMCLUSTER_DEBUG michael@0: #define memget(s) __memget_debug(s, __FILE__, __LINE__) michael@0: #define memput(p, s) __memput_debug(p, s, __FILE__, __LINE__) michael@0: #else /*MEMCLUSTER_DEBUG*/ michael@0: #ifdef MEMCLUSTER_RECORD michael@0: #define memget(s) __memget_record(s, __FILE__, __LINE__) michael@0: #define memput(p, s) __memput_record(p, s, __FILE__, __LINE__) michael@0: #else /*MEMCLUSTER_RECORD*/ michael@0: #define memget __memget michael@0: #define memput __memput michael@0: #endif /*MEMCLUSTER_RECORD*/ michael@0: #endif /*MEMCLUSTER_DEBUG*/ michael@0: #define memstats __memstats michael@0: #define memactive __memactive michael@0: michael@0: int meminit(size_t, size_t); michael@0: void * __memget(size_t); michael@0: void __memput(void *, size_t); michael@0: void * __memget_debug(size_t, const char *, int); michael@0: void __memput_debug(void *, size_t, const char *, int); michael@0: void * __memget_record(size_t, const char *, int); michael@0: void __memput_record(void *, size_t, const char *, int); michael@0: void memstats(FILE *); michael@0: int memactive(void); michael@0: michael@0: #endif /* MEMCLUSTER_H */