I would think you'd permanently set aside the memory for the driver in
CONFIG.BIB so that you're guaranteed to always have the memory and let apps
deal with the fact they have less RAM available rather than trying to run
behind the apps and beg for scraps. Seems like a far more stable way to
ensure your driver always runs.
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
"paul" <***@gmail.com> wrote in message news:ef731d01-de9f-481f-b2d5-***@l76g2000hse.googlegroups.com...
We have a camera driver, which use HalAllocateCommonBuffer() function
to allocate about 7 MB of memory for DMA access. To keep the memory
allocated for camera driver, we dont close camera driver; and then we
get not enough memory error if we try to activate video player to
play video clips.
If we dont use camera driver, video is playing as expected.
From our investigation, memory allocated by some DLL runtimes is not
released instantly after unload the DLL files (delay unload). We have
tried calling CoFreeUnusedLibrariesEx() API, but it does not work.
We suspect the memory is fragmented after running other applications;
the camera driver might not be able to get continuous pages for
function then.