harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Berezhniuk" <ilya.berezhn...@gmail.com>
Subject Re: [drlvm][gc] difference between compiled code and object data
Date Mon, 25 Feb 2008 12:30:55 GMT
Simon,

Yes, the memory is allocated by PoolManager instances, and this memory
is released with pool deletion.

GlobalCodeMemoryManager from the Global_Env is used for allocating
memory for global stubs written on encoder, arithmetic helpers etc.
This pool is deleted only on VM shutdown.

The memory for Java methods and for JNI stubs is allocated by
PoolManager local to corresponding classloader.
This memory can be deallocated due to classloader unloading when all
classes in this classloader are unloaded.

Thanks,
Ilya.


2008/2/25, Simon Chow <simon.harmony@gmail.com>:
> Egor, thanks for your answer!
>  So the memory for compiled code can be allocated by PoolManager, is it true?
>  And I do not find the routines for releasing those memory, does it means
>  that the compiled code is always there until VM is shutdown?
>
>
>  On 21 Feb 2008 15:36:17 +0300, Egor Pasko <egor.pasko@gmail.com> wrote:
>  >
>  > On the 0x3F1 day of Apache Harmony Xiao-Feng Li wrote:
>  > > On Thu, Feb 21, 2008 at 11:17 AM, Simon Chow <simon.harmony@gmail.com>
>  > wrote:
>  > > > Thanks. It is every helpful!
>  > > >  So how does Harmony manage JIT generated code at runtime? Is there
>  > some
>  > > >  consideration for code locality improvement?
>  > > >
>  > >
>  > > Simon, let the JIT people to answer the question.
>  >
>  >
>  > Simon, within each method Jitrino performs some code layout
>  > optimizations. But Jitrino does not bother with cross-method code
>  > locality, just asks VM to allocate code with
>  > method_allocate_code_block().
>  >
>  > Does that answer your question?
>  >
>  >
>  > > For your reference,
>  > > please check the paper below:
>  > > Dynamic code management: improving whole program code locality in
>  > > managed runtimes. by Xianglong Huang, Brian T. Lewis, Kathryn S.
>  > > McKinley: VEE 2006: 133-143.
>  > >
>  > > >
>  > > >  On 21/02/2008, Xiao-Feng Li <xiaofeng.li@gmail.com> wrote:
>  > > >  >
>  > > >  > Simon, currently, Harmony manages VM data and Java heap separately.
>  > > >  > Java Heap is a specific term for the space that is managed by GC
>  > for
>  > > >  > Java objects. VM data such as VM data structures and  JIT generated
>  > > >  > code have their respective management, not managed by GC. They
are
>  > > >  > interacting in certain contexts, such as class loading/unloading,
>  > > >  > etc., where native data have pointers to Java objects or the
>  > reverse.
>  > > >  > But basically they are independent at the moment.
>  > > >  >
>  > > >  > Thanks,
>  > > >  > xiaofeng
>  > > >  >
>  > > >  >
>  > > >  > On Thu, Feb 21, 2008 at 9:57 AM, Simon Chow <
>  > simon.harmony@gmail.com>
>  > > >  > wrote:
>  > > >  > > I find the compiled code produced by JIT is placed in the
JVM
>  > heap space
>  > > >  > >  (0xA0000000~0xB0000000 by default) as well as object data,
is
>  > that
>  > > >  > true?
>  > > >  > >  What's the difference of memory management policies used
for
>  > object
>  > > >  > data and
>  > > >  > >  compiled code?
>  > > >  > >
>  > > >  > >
>  > > >  > >  --
>  > > >  > >  From : Simon.Chow@Software School of Fudan University
>  > > >  > >
>  > > >  >
>  > > >  >
>  > > >  >
>  > > >  >
>  > > >  > --
>  > > >  > http://xiao-feng.blogspot.com
>  > > >  >
>  > > >
>  > > >
>  > > >
>  > > >  --
>  > > >
>  > > >
>  > > > From : Simon.Chow@Software School of Fudan University
>  > > >
>  > >
>  > >
>  > >
>  > > --
>  > > http://xiao-feng.blogspot.com
>  > >
>  >
>  >
>  > --
>  >
>  > Egor Pasko
>  >
>  >
>
>
>
> --
>
> From : Simon.Chow@Software School of Fudan University
>

Mime
View raw message