True. Memory leaks can be created on i just like any other system. On i,
you have to go to some great lengths to have one job mess with the
memory that belongs to another job. In 'nix, you can easily do that. For
'nix, all pointers are offsets from some base register set by the
operating system. For i all pointers are absolute pointers into virtual
memory; those pointers are also capabilities which limit the offsets
that can be derived from that pointer. For i, you can't run off the end
of the memory space allocated for the job or by any ALLOC/MALOC type
operation.
This actually opens up some interesting possibilities in i. You can pass
a pointer to some memory chunk within your job to another job and let
that other job write stuff or otherwise mess with your job space. You
can't do this directly in 'nix. You can allocate some "shared memory" in
'nix and get that shared pointer to another job that can also then mess
with that space. As I recall, the only way to get that shared pointer to
the another job was to allocate it in one job and then fork to create
the second job. I haven't messed with parallel processing on 'nix in a
many years. Probably more ways to do it now.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Tuesday, August 26, 2008 11:25 AM
To: Midrange Systems Technical Discussion
Subject: Re: What should I say to a *nix community?
Huh?
It's just as easy to create a memory leak on i as it is on any other
system.
vhamberg@xxxxxxxxxxx wrote:
I think Elvis was speaking about a program that has memory leaks and
all - his example speaks of misuse of a pointer - something difficult
to mess up on i, although possible - not a badly written program in
the usual way we do it in business apps, where pointers almost never
enter the equation.
At least until we enter the world of APIs!!
As an Amazon Associate we earn from qualifying purchases.