Actually, I am writing a new spm_malloc() interface for some academic research reason. The spm_malloc() is going to allocate a small on-chip memory for multicore.
it looks like: void *spm_malloc(long bytes), I test the function in many programs, it works ok. In this example, the malloc() is called like this: struct queue { int head, tail; void ** data; int size; int threads; int end_count; #ifdef PARALLEL pthread_mutex_t mutex; pthread_cond_t empty, full; #endif //PARALLEL }; struct queue *chunk_que; chunk_que = spm_normal_malloc(sizeof(struct queue) * nqueues); pthread_mutex_init(&que->mutex, NULL); pthread_mutex_lock(&que->mutex); //The error occurs here! ... Can you tell me how the malloc() function will do some relationship with the pthread_mutex_lock() function? I think that is the point. Many thanks. 2011/3/19 Ian Collins <i...@ianshome.com> > On 03/19/11 08:33 PM, dengning wrote: > >> I wrote a new memory allocation function to replace the glibc malloc() in >> solaris 10. >> >> (Open)Solaris does not use glibc. > > There are a number of alternative allocators provided (libumem for > example), do any of these meet your needs? > > -- > Ian. > > -- Regards Deng Ning (邓 宁) School Of Computer Science and Technology Beijng Institute of Technology, China, 100081 dunning2...@gmail.com
_______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org