harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiao-Feng Li <xiaofeng...@gmail.com>
Subject Re: Terminology etc
Date Thu, 26 May 2005 11:25:31 GMT
On 5/26/05, Matthew French <matthew@camary.co.za> wrote:
> I am not even sure if merging the OS and VM memory managers is worthwhile
> goal.
> 
> One reason is a hardware constraint: most hardware handles virtual memory
> in pages, typically 4kb at a time. So managing memory at a granular level
> will result in a lot of wasted space.

People usually develop memory manager for OS kernel at multiple levels
for a variety of purposes. It's not limited to the hardware page
granularity. People just don't call them GC in OS kernel.

> A more pragmatic reason is that as the number of allocated items grows it
> takes more and more time to allocate and free memory. Or you gave memory
> fragmentation issues. Or more often than not you have both problems.
> The operating system uses a similar technique to APR memory pools and for
> a similar reason. It allows it to ignore all memory leaks and just dump
> the memory of an entire process.
> 
> (Although I am sure you know all this already - but I think it should be
> stated that the OS and VM memory managers solve entirely different
> problems.)

OS kernel has also data structures or objects like a VM has, and can
be managed in the same way. The problems you mentioned can exist in a
VM if the memory management is implemented improperly.

> Maybe a more interesting approach would be to have a VM that supports
> OS-like allocation. This could be useful in container applications like
> JBoss - reload the EJB application and remove all references to the
> previous instance. Think of it as an in-VM stop and start.
> 
> Even so this would require non-standard extensions, and JBoss already
> solves most of the issues around reloading. We already have a loong list
> of issues to solve, and this should not even come onto that list...

Matthew, what does the "OS-like allocation" here refer to? I think the
main difference between OS-like allocation and VM-like allocation is,
more frequently the OS doesn't know the semantics of the objects
consuming the memory, while VM has object class or type information.
But they are not entirely different.
 
> - Matthew
> 
> 
>

Mime
View raw message