PSRAM questions

bnobel

New member
Hi all, I have a questions about PSRAM.

I have 2 8mb PSRAM chips attached to my Teensy 4.1 and working great. I'm using them for a project that will have a definable memory
in PSRAM as well as a variable area through malloc() & free().

When I allocate PSRAM with EXTMEN directive in source, does this get accomodated in 'extmem_smalloc_pool' so that use of extmem_malloc function knows the difference?

Thanks for any response

-Bill Nobel
 
Compile time reservations with EXTMEM advance a value - seems it is _extram_end - that tracks those allocs and the alloc pool starts above that.

Can confirm printing pointer returned in a simple sketch with NO EXTMEM use - then add some EXTMEM char foo[1024*1024] and that same ptr should then shift.
 
Thanks @defragster, that answers my question. I was wondering how it worked between the compile to runtime.
 
Back
Top