examples/sfexamples/oggvorbiscodec/src/OggVorbisUtil/leavealloc.cpp

00001 // leavealloc.cpp
00002 //
00003 // Copyright (c) Symbian Software Ltd 2005-2006.  All rights reserved.
00004 //
00005 
00006 #include <e32std.h>
00007 #include <stdlib.h>
00008 #include "leavealloc.h"
00009 
00010 
00011 
00012 void* mallocL(size_t _size)
00013     {
00014     void* ptr = malloc(_size);
00015     if (!ptr) User::Leave(KErrNoMemory);
00016     return ptr;
00017     }
00018 
00019 void* callocL(size_t _nmemb, size_t _size)
00020     {
00021     void* ptr = calloc(_nmemb, _size);
00022     if (!ptr) User::Leave(KErrNoMemory);
00023     return ptr;
00024     }
00025 
00026 void* reallocL(void * _r, size_t _size)
00027     {
00028     void* ptr = realloc(_r, _size);
00029     if (!ptr) User::Leave(KErrNoMemory);
00030     return ptr;
00031     }
00032 
00033 void freeL(void * _ptr)
00034     {
00035     free(_ptr);
00036     }
00037 

Generated by  doxygen 1.6.2