imcs.c
/* imcs_alloc can be concurrently invoked from multiple threads, so as far as MemoryContextAlloc is non reetrant we have to use mutex here
 */
imcs_alloc can be concurrently invoked from multiple threads, so as far as MemoryContextAlloc is non reetrant we have to use mutex here
imcs_alloc can be concurrently invoked from multiple threads so as far as MemoryContextAlloc is non reetrant we have to use mutex here
void* imcs_alloc(size_t size)
{
    void* ptr;
    imcs_alloc_mutex->lock(imcs_alloc_mutex);
    ptr = MemoryContextAlloc(imcs_mem_ctx, size);
    imcs_alloc_mutex->unlock(imcs_alloc_mutex);
    return ptr;
}
void * imcs_alloc ( size_t size ) { void * ptr ; imcs_alloc_mutex -> lock ( imcs_alloc_mutex ) ; ptr = MemoryContextAlloc ( imcs_mem_ctx , size ) ; imcs_alloc_mutex -> unlock ( imcs_alloc_mutex ) ; return ptr ; }
imcs_alloc can be concurrently invoked from multiple threads, so as far as MemoryContextAlloc is non reetrant we have to use mutex here
imcs_alloc can be concurrently invoked from multiple threads so as far as MemoryContextAlloc is non reetrant we have to use mutex here