#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <zlib.h>
#include "Compress.hpp"
#include "MemStreamer.hpp"
#include "Input.hpp"
#include "Output.hpp"
Go to the source code of this file.
Functions | |
void * | zalloc (void *opaque, unsigned items, unsigned size) |
void | zfree (void *opaque, void *ptr) |
|
Definition at line 64 of file ZLib.cpp. 00066 { 00067 #ifdef ZALLOC_COUNT 00068 void *ptr=malloc(items*size+4); 00069 #else 00070 void *ptr=malloc(items*size); 00071 #endif 00072 if(ptr==NULL) 00073 ExitNoMem(); 00074 00075 // printf("zalloc : %lu * %lu ==> %lX\n",items,size,ptr); 00076 00077 #ifdef ZALLOC_COUNT 00078 allocsize+=size; 00079 *(unsigned *)ptr=size; 00080 return (void *)(((char *)ptr)+4); 00081 #else 00082 return (void *)ptr; 00083 #endif 00084 } |
|
|