Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.unix.programmer > #297
| From | Rainer Weikusat <rweikusat@mssgmbh.com> |
|---|---|
| Newsgroups | comp.unix.programmer |
| Subject | Tracing garbage collectors are broken |
| Date | 2011-05-03 12:28 +0100 |
| Message-ID | <8739kwt446.fsf@sapphire.mobileactivedefense.com> (permalink) |
because the rely on the assumption that the set of 'spaces' they can inspect
in order to find pointers/ references to objects is identical to the
set of all spaces where such pointers/ references could possibly be
stored. This assumption is false for systems connected to networks or
employing any kind of internal memory protection. A simple example:
The two Perl subroutines below are part of a 'task queue'
implementation used in some program I wrote as part of my job. They
basically work by getting the memory address of a Perl object,
incrementing the corresponding reference count and sending the address
over a socketpair to an endpoint the same program listens on (the idea
behind that is to run 'some task' from the top-level event loop
instead of the current execution context).
sub schedule_task($$)
{
my ($task, $name) = @_;
my ($tsk, $rc);
$tsk->[NAME] = $name;
$tsk->[TASK] = $task;
$rc = syswrite($task_sk_0, pack('L!', package_sv($tsk)));
$rc // sys_die(__func__, 'syswrite');
p_debug('%s: \'%s\'', __func__, $name);
}
sub run_tasks()
{
my ($rc, $tsk);
while (($rc = sysread($task_sk_1, $tsk, 0xffff)) > 0) {
$tsk = unpackage_sv(unpack('L!', $tsk));
p_debug('%s: %s', __func__, $tsk->[NAME]);
$tsk->[TASK]->();
}
sys_die(__func__, 'sysread') unless $! == EAGAIN;
}
Another example would be the Linux epoll mechanism where the kernel
can be instructed to store a pointer to some location in an
application memory space and return that in case an 'interesting
event' occurs.
Back to comp.unix.programmer | Previous | Next — Next in thread | Find similar
Tracing garbage collectors are broken Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-03 12:28 +0100
Re: Tracing garbage collectors are broken Michael Press <rubrum@pacbell.net> - 2011-05-03 20:58 -0700
Re: Tracing garbage collectors are broken gordonb.nw5lc@burditt.org (Gordon Burditt) - 2011-05-04 01:58 -0500
Re: Tracing garbage collectors are broken Richard Kettlewell <rjk@greenend.org.uk> - 2011-05-04 09:33 +0100
Re: Tracing garbage collectors are broken Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-04 15:09 +0100
Re: Tracing garbage collectors are broken Nobody <nobody@nowhere.com> - 2011-05-05 08:42 +0100
Re: Tracing garbage collectors are broken Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-05 11:52 +0100
Re: Tracing garbage collectors are broken William Ahern <william@wilbur.25thandClement.com> - 2011-05-05 11:46 -0700
Re: Tracing garbage collectors are broken Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-05-05 20:41 +0100
csiph-web