+2010-02-04 Ivan Maidanski <ivmai@mail.ru>
+
+ * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
+ if THREADS is undefined.
+ * include/gc.h (GC_malloc_many): Update the comment.
+
2010-02-03 Ivan Maidanski <ivmai@mail.ru>
* ChangeLog: Fix some typos.
/* This returns a list of objects, linked through their first word. */
/* Its use can greatly reduce lock contention problems, since the */
/* allocation lock can be acquired and released many fewer times. */
-/* Exported only if the library has been compiled with threads support. */
GC_API void * GC_CALL GC_malloc_many(size_t /* lb */);
#define GC_NEXT(p) (*(void * *)(p)) /* Retrieve the next element */
/* in returned list. */
GC_bytes_freed += n;
}
-#if defined(THREADS)
-
# ifdef PARALLEL_MARK
STATIC volatile signed_word GC_bytes_allocd_tmp = 0;
/* Number of bytes of memory allocated since */
(void) GC_clear_stack(0);
}
+/* Note that the "atomic" version of this would be unsafe, since the */
+/* links would not be seen by the collector. */
GC_API void * GC_CALL GC_malloc_many(size_t lb)
{
void *result;
- GC_generic_malloc_many(((lb + EXTRA_BYTES + GRANULE_BYTES-1)
- & ~(GRANULE_BYTES-1)),
+ GC_generic_malloc_many((lb + EXTRA_BYTES + GRANULE_BYTES-1)
+ & ~(GRANULE_BYTES-1),
NORMAL, &result);
return result;
}
-/* Note that the "atomic" version of this would be unsafe, since the */
-/* links would not be seen by the collector. */
-#endif /* THREADS */
-
/* Allocate lb bytes of pointerful, traced, but not collectable data */
GC_API void * GC_CALL GC_malloc_uncollectable(size_t lb)
{