Initially shoot_malloc seemed to work fine.
I had an error in the card test and I fixed it like this:
if (bufsize > 1024*1024) bmp_printf(FONT_MED, x, y += font_med.height, "read test skipped: buffer=%d\n", bufsize);
else
{
//void* buf = alloc_dma_memory(bufsize);
void* buf = shoot_malloc(bufsize);
Worked fine for a while... I did r/w tests on my cards. Today I got a new UHS card:
(http://i.imgur.com/AF05rh2.png) (http://imgur.com/AF05rh2)
Someone else is complaining about formatting also throwing a shoot malloc error.
"estart your camera (shoot_malloc err)." :R
But shoot_malloc passes the stubs test and it seemed to work not too long ago.
[Pass] p = alloc_dma_memory(256*1024) => 0x4089a8dc
[Pass] UNCACHEABLE(p) => 0x4089a8dc
[Pass] CACHEABLE(p) => 0x89a8dc
[Pass] UNCACHEABLE(CACHEABLE(p)) => 0x4089a8dc
free_dma_memory(p)
[Pass] p = (void*)shoot_malloc(24*1024*1024) => 0x427bc074
[Pass] UNCACHEABLE(p) => 0x427bc074
shoot_free(p)
m11 = MALLOC_FREE_MEMORY => 0x6f640
m12 = GetFreeMemForAllocateMemory() => 0x2f4e0c
Only fails on date... which doesn't seem related.
[FAIL] ABS(mod(t1-t0, 1048576)/1000 - 250) => 0x2c
LoadCalendarFromRTC( &now )
s0 = now.tm_sec => 0x1e
Date/time: 2013/03/08 18:27:30
msleep(1500)
LoadCalendarFromRTC( &now )
s1 = now.tm_sec => 0x1f
After taking photos, the shooting memory becomes fragmented. I don't know how to handle these fragments, so it may fail to allocate large chunks.
Restarting the camera fixes this, at least for me.
Skips read test from a fresh start.