On Mar 18, 2010, at 10:46 PM, Brad Beckmann wrote:
>
>
> Finally, a couple of these patches deal with transferring data  
> between M5 and
> ruby .  These patches are intended to start a conversation.
> I imagine these patches won't
> be checked in as is.  If I'm mistaken please correct me, but it
> appears that M5 dynamic data is allocated on the heap, while M5  
> static data
> is on the stack.  Therefore after the initial call to RubyRequest,  
> static
> data must be copied or the data pointer will point to garbage.   
> Currently
> RubyPort does not copy M5 data, but instead directly uses the M5  
> packet data
> pointer for dynamic data and sets the data pointer to NULL for  
> static data.
> Before I added static data copy support to RubyPort, I want to  
> understand why
> M5 uses static data for Ifetches and some device dma.

static doesn't necessarily mean that it is allocated on the stack.  
More often than not, it just means that the object that is allocating  
it's data statically simply has one data blob in the object that it  
will use for all requests to limit the number of new/free calls. If  
there is a case where data corruption results, it seems like it should  
occur regardless of if Ruby is used or not.

Thanks,
Ali


_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to