Hello Sigbjorn,
Tuesday, August 4, 2009, 6:11:09 PM, you wrote:
> this using the type system, if you so wish..) I don't know if the GHC
> RTS still(?) provides hooks for allocating "alloca" objects specially.
it's allocated as usual object, these are cheap anyway as far as it
freed before minor
On Tue, Aug 4, 2009 at 2:49 PM, Simon Marlow wrote:
> On 04/08/2009 13:33, Sam Martin wrote:
>
>> Sounds like region inference to me.
>>> (https://secure.wikimedia.org/wikipedia/en/wiki/Region_inference)
>>>
>>
>> Thanks, yes, that's exactly what I had in mind.
>>
>> Is anything like this is don
Hi,
staying in the realm of the explicit and pragmatic, various libraries
in Haskell do provide safe&explicit region/alloca/stack allocation
actions, e.g.,
Foreign.Marshal.Alloc.allocaBytes :: Int -> (Ptr a -> IO b) -> IO b
with the promise that the pointer doesn't escape here (you could con
On 04/08/2009 13:33, Sam Martin wrote:
Sounds like region inference to me.
(https://secure.wikimedia.org/wikipedia/en/wiki/Region_inference)
Thanks, yes, that's exactly what I had in mind.
Is anything like this is done in GHC?
Not at the moment, no.
Bear in mind that with generational GC, a
> Sounds like region inference to me.
> (https://secure.wikimedia.org/wikipedia/en/wiki/Region_inference)
Thanks, yes, that's exactly what I had in mind.
Is anything like this is done in GHC?
Ta,
Sam
___
Haskell mailing list
Haskell@haskell.org
http
On Tue, Aug 4, 2009 at 7:30 AM, Sam Martin wrote:
I can picture similar situations arising in Haskell where for suitable
expressions the compiler could in theory determine that garbage
collection would be unnecessary for a lump of temporary data and simply
allocate/deallocate when starting/finish
I'm not quite sure how to describe this, but are you aware of any
research into converting heap allocations into frames on a stack?
For example, many C functions follow this kind of pattern:
void doSomeStuff(..)
{
// allocate required resources
int a,b,c; // finite amount of
Nathan,
I'm interested in research relating to memory management in
Haskell. I'm at the point where I don't know enough to have very
specific questions, but I'm especially interested in garbage collection
in Haskell, and any available statistics (such as, how long does a thunk
typically