Rockbox

Tasklist

FS#9506 - buffer_alloc the dircache stack

Attached to Project: Rockbox
Opened by Jonathan Gordon (jdgordon) - Monday, 27 October 2008, 16:03 GMT
Last edited by amaury pouly (pamaury) - Thursday, 18 February 2010, 23:16 GMT
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

seen as there is no point having the dircache thread if its disabled, and because it cant be enabled without rebooting, there is no need having the stack statically allocated...

untested on target...
This task depends upon

Closed by  amaury pouly (pamaury)
Thursday, 18 February 2010, 23:16 GMT
Reason for closing:  Rejected
Additional comments about closing:  Recents commits r24657 and r24708 already saved quite some space and reduced the size of the dircache thread stack.
Comment by Jonathan Gordon (jdgordon) - Tuesday, 28 October 2008, 13:51 GMT
new version removes one set of buffer_alloc()'s which is required even if dircache is disabled.
Comment by Jonathan Gordon (jdgordon) - Tuesday, 28 October 2008, 14:12 GMT
OK, So I'm pretty sure I'm only looking at this because i should be studying for exams so I dont really know what to do about this patch...
if its about freeing up more RAM when its disabled then there is another 30KB buffer (dir_recursion, line 157) which could be buffer_alloc()-ed which is a hell of a lot more than the ~800 bytes + 1 thread saved by the patch in the previous comment...
but if the plan is to (hopefully) make buffer_alloc() be able to tell everything that called it to dump the ram and realloc it later, then I dont know if changing that buffer is helpful in the long run... will freeing up 31K do anything more than give a nice ram delta?
Comment by Rafaël Carré (funman) - Monday, 03 November 2008, 05:42 GMT
+#define DIRCACHE_STACK_SIZE (DEFAULT_STACK_SIZE + 0x900)/sizeof(long)

you should remove /sizeof(long) if buffer_alloc() takes an argument in bytes
Comment by Jonathan Gordon (jdgordon) - Monday, 03 November 2008, 07:48 GMT
ah yes, thanks, will do that if we decide to commit this

Loading...