Forum Index
Can system.alloc be slow?

 
Author Message
stevech



Joined: 23 Feb 2006

Posted: 02 November 2006, 5:14 AM    Post subject: Can system.alloc be slow?

can the execution time of system.alloc() be quite slow, like 100's of mSec?

can it cause a rescheduling before it returns, due to memory management work such as garbage collection/defrag?
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 02 November 2006, 6:10 AM    Post subject: Re: Can system.alloc be slow?

stevech wrote:
can the execution time of system.alloc() be quite slow, like 100's of mSec?

That's a long time. I'd be suprised if an allocation request would take that long. A highly fragmented heap will cause longer average allocation times, of course. I'd be interested in hearing more about what you're seeing and the circumstances that lead up to it.

stevech wrote:
can it cause a rescheduling before it returns, due to memory management work such as garbage collection/defrag?

No. Allocation requests do nothing other than their specific function.
Back to top
stevech



Joined: 23 Feb 2006

Posted: 02 November 2006, 6:26 AM    Post subject:

I'm just fishing for why my state machine program doesn't work well enough now after I changed from static memory stacks in the tasks to stacks obtained via system.alloc(). I can't blame that change. But that's about all that I changed. The problem is speed related. By design, state machine changes states quite slowly, on the scale of a second or several seconds.

I need to do more analysis/measurements.
Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008, 2009, 2010 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group