gonzui


Format: Advanced Search

tkernel_2/lib/libtk/src/malloc.cbare sourcepermlink (0.00 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    T-Kernel 2.0 Software Package
    4:  *
    5:  *    Copyright 2011 by Ken Sakamura.
    6:  *    This software is distributed under the latest version of T-License 2.x.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
   10:  *    Modified by TRON Forum(http://www.tron.org/) at 2015/06/01.
   11:  *
   12:  *----------------------------------------------------------------------
   13:  */
   14: 
   15: /*
   16:  *      @(#)malloc.c (libtk)
   17:  *
   18:  *      Non resident system memory allocation
   19:  */
   20: 
   21: #include "libtk.h"
   22: #include <sys/util.h>
   23: 
   24: EXPORT void* malloc( size_t size )
   25: {
   26:         return Vmalloc(size);
   27: }
   28: 
   29: EXPORT void* calloc( size_t nmemb, size_t size )
   30: {
   31:         return Vcalloc(nmemb, size);
   32: }
   33: 
   34: EXPORT void* realloc( void *ptr, size_t size )
   35: {
   36:         return Vrealloc(ptr, size);
   37: }
   38: 
   39: EXPORT void free( void *ptr )
   40: {
   41:         Vfree(ptr);
   42: }