classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory allocation


From: Archie Cobbs
Subject: Re: memory allocation
Date: Mon, 28 Apr 2003 09:04:53 -0700 (PDT)

Brian Jones wrote:
> Some time ago someone mentioned that they would like memory allocated
> within the classpath native libraries to use the JVM to
> allocate/deallocate for better tracking of usage, etc.  There appears
> to be nothing in the JNI to really do this so I'm thinking that Sun
> doesn't bother either.  The situation with libraries like GDK, GTK,
> glib, etc. probably would complicate things.  I don't know of a way of
> changing the method of memory allocation in existing libraries without
> modifying the code to explicitly support such things, but I could be
> wrong here.  So are there any changes that need to be made with
> respect to the use of malloc, etc. in JNI libraries?

The only way I could think of would be e.g. allocating memory by creating
byte[] arrays instead of using malloc(). This seems awkward.

-Archie

__________________________________________________________________________
Archie Cobbs     *     Precision I/O      *     http://www.precisionio.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]