Annotation of parser3/src/targets/apache13/pa_pool.C, revision 1.2

1.1       parser      1: /** @file
                      2:        Parser: Apache module memory manager impl.
                      3: 
                      4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
                      5:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
                      6: 
1.2     ! paf         7:        $Id: pa_pool.C,v 1.1 2001/10/11 08:29:21 parser Exp $
1.1       parser      8: */
                      9: 
                     10: #include "httpd.h"
                     11: 
                     12: #include "pa_pool.h"
                     13: 
1.2     ! paf        14: void *Pool::real_malloc(size_t size, int place) {
1.1       parser     15:        return ap_palloc((pool*)fstorage, size);
                     16: }
                     17: 
                     18: void *Pool::real_calloc(size_t size) {
                     19:        return ap_pcalloc((pool*)fstorage, size);
                     20: }
                     21: 
                     22: bool Pool::real_register_cleanup(void (*cleanup) (void *), void *data) {
                     23:        /* NB any code which invokes register_cleanup ... directly
                     24:         * is a critical section which should be guarded by block_alarms() and
                     25:         * unblock_alarms() ...
                     26:         */
                     27: 
                     28:        ap_block_alarms();
                     29: 
                     30:        ap_register_cleanup((pool*)fstorage, data,
                     31:                cleanup,
                     32:                ap_null_cleanup);
                     33: 
                     34:        ap_unblock_alarms();
                     35: 
                     36:        return true;
                     37: }

E-mail: