File:  [parser3project] / parser3 / src / targets / cgi / Attic / pa_pool.C
Revision 1.33: download - view: text, annotated - select for diffs - revision graph
Thu Dec 13 13:02:43 2001 UTC (24 years, 7 months ago) by paf
Branches: MAIN
CVS tags: HEAD
msvc heap debugging flag

/** @file
	Parser: CGI memory manager impl.

	Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
	Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)

	$Id: pa_pool.C,v 1.33 2001/12/13 13:02:43 paf Exp $
*/

#include "pa_pool.h"
#include "pool_storage.h"

void *Pool::real_malloc(size_t size, int place) {
	return fstorage?
		static_cast<Pool_storage *>(fstorage)->malloc(size): ::malloc(size);
}

void *Pool::real_calloc(size_t size) {
	return fstorage?
		static_cast<Pool_storage *>(fstorage)->calloc(size): ::calloc(size, 1);
}

bool Pool::real_register_cleanup(void (*cleanup) (void *), void *data) {
	return fstorage!=0 && static_cast<Pool_storage *>(fstorage)->register_cleanup(cleanup, data);
}

E-mail: