*/
//#define XDOMAIN_CHECKS_IN_WBARRIER
-#ifndef BINARY_PROTOCOL
+#ifndef SGEN_BINARY_PROTOCOL
#ifndef HEAVY_STATISTICS
#define MANAGED_ALLOCATION
#ifndef XDOMAIN_CHECKS_IN_WBARRIER
DEBUG (1, fprintf (gc_debug_file, "Heap consistency check done.\n"));
-#ifdef BINARY_PROTOCOL
+#ifdef SGEN_BINARY_PROTOCOL
if (!binary_protocol_file)
#endif
g_assert (!missing_remsets);
heap_dump_file = fopen (filename, "w");
if (heap_dump_file)
fprintf (heap_dump_file, "<sgen-dump>\n");
-#ifdef BINARY_PROTOCOL
+#ifdef SGEN_BINARY_PROTOCOL
} else if (g_str_has_prefix (opt, "binary-protocol=")) {
char *filename = strchr (opt, '=') + 1;
binary_protocol_file = fopen (filename, "w");
g_assert (buffer->index > 0);
fwrite (buffer->buffer, 1, buffer->index, binary_protocol_file);
- free_os_memory (buffer, sizeof (BinaryProtocolBuffer));
+ mono_sgen_free_os_memory (buffer, sizeof (BinaryProtocolBuffer));
}
static void
if (buffer && buffer->index + length <= BINARY_PROTOCOL_BUFFER_SIZE)
return buffer;
- new_buffer = get_os_memory (sizeof (BinaryProtocolBuffer), TRUE);
+ new_buffer = mono_sgen_alloc_os_memory (sizeof (BinaryProtocolBuffer), TRUE);
new_buffer->next = buffer;
new_buffer->index = 0;
if (InterlockedCompareExchangePointer ((void**)&binary_protocol_buffers, new_buffer, buffer) != buffer) {
- free_os_memory (new_buffer, sizeof (BinaryProtocolBuffer));
+ mono_sgen_free_os_memory (new_buffer, sizeof (BinaryProtocolBuffer));
goto retry;
}
/* missing: finalizers, dislinks, roots, non-store wbarriers */
-void binary_protocol_flush_buffers (void) MONO_INTERNAL;
void binary_protocol_collection (int generation) MONO_INTERNAL;
void binary_protocol_alloc (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;
void binary_protocol_alloc_pinned (gpointer obj, gpointer vtable, int size) MONO_INTERNAL;