82 |
82 |
83 #ifdef DEBUG_CACHES |
83 #ifdef DEBUG_CACHES |
84 NSAPI_PUBLIC int INTpool_service_debug(pblock *pb, Session *sn, Request *rq); |
84 NSAPI_PUBLIC int INTpool_service_debug(pblock *pb, Session *sn, Request *rq); |
85 #endif |
85 #endif |
86 |
86 |
|
87 /* |
87 NSAPI_PUBLIC pool_handle_t *INTpool_create(void); |
88 NSAPI_PUBLIC pool_handle_t *INTpool_create(void); |
88 |
89 |
89 NSAPI_PUBLIC void *INTpool_mark(pool_handle_t *pool_handle); |
90 NSAPI_PUBLIC void *INTpool_mark(pool_handle_t *pool_handle); |
90 |
91 |
91 NSAPI_PUBLIC void INTpool_recycle(pool_handle_t *pool_handle, void *mark); |
92 NSAPI_PUBLIC void INTpool_recycle(pool_handle_t *pool_handle, void *mark); |
105 void *INTpool_realloc(pool_handle_t *pool_handle, void *ptr, size_t size ); |
106 void *INTpool_realloc(pool_handle_t *pool_handle, void *ptr, size_t size ); |
106 |
107 |
107 NSAPI_PUBLIC |
108 NSAPI_PUBLIC |
108 char *INTpool_strdup(pool_handle_t *pool_handle, const char *orig_str ); |
109 char *INTpool_strdup(pool_handle_t *pool_handle, const char *orig_str ); |
109 |
110 |
|
111 */ |
|
112 |
110 #ifdef DEBUG |
113 #ifdef DEBUG |
111 NSAPI_PUBLIC void INTpool_assert(pool_handle_t *pool_handle, const void *ptr); |
114 NSAPI_PUBLIC void INTpool_assert(pool_handle_t *pool_handle, const void *ptr); |
112 #endif |
115 #endif |
113 |
116 |
114 #ifdef __cplusplus |
117 #ifdef __cplusplus |
125 #define POOL_ASSERT(pool, ptr) INTpool_assert(pool, ptr); |
128 #define POOL_ASSERT(pool, ptr) INTpool_assert(pool, ptr); |
126 #else |
129 #else |
127 #define POOL_ASSERT(pool, ptr) |
130 #define POOL_ASSERT(pool, ptr) |
128 #endif |
131 #endif |
129 |
132 |
130 #define pool_create INTpool_create |
|
131 #define pool_mark INTpool_mark |
|
132 #define pool_recycle INTpool_recycle |
|
133 #define pool_destroy INTpool_destroy |
|
134 #define pool_enabled INTpool_enabled |
|
135 #define pool_malloc INTpool_malloc |
|
136 #define pool_free INTpool_free |
|
137 #define pool_calloc INTpool_calloc |
|
138 #define pool_realloc INTpool_realloc |
|
139 #define pool_strdup INTpool_strdup |
|
140 |
|
141 #endif /* INTNSAPI */ |
133 #endif /* INTNSAPI */ |
142 |
134 |
143 #endif /* !BASE_POOL_H_ */ |
135 #endif /* !BASE_POOL_H_ */ |