version 1.15, 2002/06/19 18:01:00 |
version 1.16, 2002/06/21 05:50:51 |
|
|
void |
void |
monitor_sync(struct monitor *pmonitor) |
monitor_sync(struct monitor *pmonitor) |
{ |
{ |
/* The member allocation is not visible, so sync it */ |
if (options.compression) { |
mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback); |
/* The member allocation is not visible, so sync it */ |
|
mm_share_sync(&pmonitor->m_zlib, &pmonitor->m_zback); |
|
} |
} |
} |
|
|
int |
int |
|
|
sizeof(outgoing_stream)); |
sizeof(outgoing_stream)); |
|
|
/* Update with new address */ |
/* Update with new address */ |
mm_init_compression(pmonitor->m_zlib); |
if (options.compression) |
|
mm_init_compression(pmonitor->m_zlib); |
|
|
/* Network I/O buffers */ |
/* Network I/O buffers */ |
/* XXX inefficient for large buffers, need: buffer_init_from_string */ |
/* XXX inefficient for large buffers, need: buffer_init_from_string */ |
|
|
mon->m_sendfd = pair[1]; |
mon->m_sendfd = pair[1]; |
|
|
/* Used to share zlib space across processes */ |
/* Used to share zlib space across processes */ |
mon->m_zback = mm_create(NULL, MM_MEMSIZE); |
if (options.compression) { |
mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE); |
mon->m_zback = mm_create(NULL, MM_MEMSIZE); |
|
mon->m_zlib = mm_create(mon->m_zback, 20 * MM_MEMSIZE); |
|
|
/* Compression needs to share state across borders */ |
/* Compression needs to share state across borders */ |
mm_init_compression(mon->m_zlib); |
mm_init_compression(mon->m_zlib); |
|
} |
|
|
return mon; |
return mon; |
} |
} |