[mercury-users] a theoretical problem

Tom Wouters tom.wouters1 at student.kuleuven.ac.be
Fri Apr 25 04:19:01 AEST 2003


Fergus Henderson wrote:
> On 24-Apr-2003, Tom Wouters <tom.wouters1 at student.kuleuven.ac.be> wrote:
> 

> Was that 16K RAM, 16K ROM, or 16K total?

It actually is 32K RAM, of which the OS-kernel uses 16K

i also forgot to mention that it's an 8-bit architecture,
so some of the clevernesses used in Mercury might not work?
(i think i read something in a paper about Mercury, that it uses the 
unused bits in a pointer for storing type-information or something like 
that?)

> I think it would most likely be possible to run some Mercury programs on
> such a system, with a few caveats.  The first major caveat is that the
> garbage collection is not likely to be usable in such an environment.
> The second caveat is that getting it all working would probably require
> a lot of effort.  The third caveat is that although you can probably
> squeeze Mercury to fit in 16K, with a lot of effort, once you've done so I
> think you won't have any space left over to do anything useful.  (If your
> embedded processor had 32k or 64k, that would make it a lot easier.)

also the runtime stacks will use op quite a lot of memory i think

> What size address space does this processor use?

it has a 64K adresspace according to the documentation

> With 16 Kb in a 16-bit
> address space, half of the addressable memory is in use; conservative
> GC techniques don't work so well in such situations

...

> So if you've only got 16 Kb, I'd recommend avoiding GC, and instead using
> semi-manual techniques to reclaim memory, such as heap reclamation on
> failure and/or io__gc_call.

i guess that would be the 'easiest' thing to do indeed

thx for your response! i think it will help us a lot.

Tom
-- 
<------------------------------------->
< tom.wouters1 at student.kuleuven.ac.be >
< aqua at ulyssis.org                    >
< pgp-key id: 0xA9A4985D              >
<------------------------------------->


--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list