Age | Commit message (Collapse) | Author |
|
|
|
* pq.c (packet_set_ports): Correctly replace old ports buffer with
new one. Take size of mach_port_t rather than pointer to it.
(packet_read_ports): Take size of mach_port_t rather than pointer
to it.
(pq_queue): Update PACKET->num_ports, PACKET->buf_start and
PACKET->buf_end for reused packets as well.
Submitted by Ognyan Kulev <ogi@fmi.uni-sofia.bg>.
|
|
* pq.c (packet_realloc): Use mmap instead of vm_allocate.
(packet_read_ports): Likewise.
(packet_read): Likewise.
|
|
* pq.c: Add #include <sys/mman.h> for munmap decl.
|
|
* pq.c (free_packets): Use munmap instead of vm_deallocate.
|
|
|
|
|
|
vm_alloced buffer, deallocate it.
|
|
removed any empty space at the beginning of BUF.
|
|
(packet_new_size): New function.
(packet_read): Re-arrange to be slightly less confusing.
Reverse start-past-buf-beginning test that may have leaked memory.
|
|
(packet_read): When a page-aligned read consumes the whole buffer, but there's
a non-page-multiple amount available, don't let buf_len go negative.
|
|
but doesn't a page-multiple amount of data and we're reading everything.
|
|
|