- 论坛徽章:
- 0
|
threads=(pthread_t*)malloc((thread_num)*sizeof(int));
thread_c=(pthread_cond_t*)malloc((thread_num)*sizeof(pthread_cond_t));
这两句应该有错,但是不知错在哪了,我不明白如何动态声明一个条件变量的数组!!!
编译可以通过,但是运行就报如下错误:
malloc.c:2451: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
已放弃 (核心已转储)
跪求各位大神!!! |
|