lightning
[Top][All Lists]
Advanced

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

[Lightning] Predicting generated code size


From: Sandro Magi
Subject: [Lightning] Predicting generated code size
Date: Fri, 28 Sep 2007 12:45:28 -0400

The examples in the manual provide a buffer to which Lightning outputs
the generated code.

My intended usage is to garbage collect generated code. I would like
to use the Boehm conservative GC at first, in which case I would need
to allocate a buffer for each generated function, which can obviously
lead to quite a bit of wasted space, or perhaps even a buffer that is
too small thus incurring an additional deallocation+allocation.

Are there any heuristics or techniques to portably predict the size of
the generated code so as to more accurately allocate the buffer?

Or perhaps, some technique to chain buffers together and auto-insert a
jmp to the next buffer address when the current buffer is full?

Sandro




reply via email to

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