Skip to content
This repository
tree: 8a18e62c96
Fetching contributors…

Cannot retrieve contributors at this time

file 62 lines (49 sloc) 2.292 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
/*
This file is part of WJElement.

WJElement is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

WJElement is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with WJElement. If not, see <http://www.gnu.org/licenses/>.
*/


/****************************************************************************
* stub replacement for Messaging Architects' internal MemMgr library
****************************************************************************/

#ifndef MEMMGR_H
#define MEMMGR_H

#include "xpl.h"
#include <string.h>
#include <stdlib.h>


#define MemAssert(p)

#define MemoryManagerOpen( c )
#define MemoryManagerOpenEx( c, cfg )
#define MemoryManagerClose( c )
#define MemUpdateOwner( p, f, l )
#define MemCopyOwner( d, s )
#define MemGetOwner( p, f, l )
#define MemMallocEx( p, s, a, w, z ) malloc( (s) ); if( (a) ) { (*a) = (s); } if( (z) ) { memset( (p), 0, (s) ); }
#define MemMalloc( s ) malloc( (s) )
#define MemMallocWait( s ) malloc( (s) )
#define MemFree( p ) free( (p) )
#define MemFreeEx( p, f, l ) free( (p) )
#define MemRelease( p ) free( (*p) ); (*p) = NULL
#define MemReleaseEx( p, f, l ) free( (*p) ); (*p) = NULL
#define MemRealloc( p, s ) realloc( (p), (s) )
#define MemReallocWait( p, s ) realloc( (p), (s) )
#define MemStrdup( s ) strdup( (s) )
#define MemStrdupWait( s ) strdup( (s) )
#define MemStrndup( s, m ) strndup( (s), (m) )
#define MemStrndupWait( s, m ) strndup( (s), (m) )
#define MemSprintf( f, ... ) sprintf( (f), __VA_ARGS__ )
#define MemAsprintf( p, f, ... ) asprintf( (p), (f), __VA_ARGS__ )
#define MemCalloc( c, s ) calloc( (c), (s) )
#define MemCallocWait( c, s ) calloc( (c), (s) )

#define MemGenerateReports()
#define MemDumpPools( f )
#define MemConsumer()


#endif // MEMMGR_H
Something went wrong with that request. Please try again.