Hi Paulo
Curaga is right. This is a very bad idea, not just because you are essentially deceiving the kernel, but because there
are simpler ways to accomplish this.
I have a need to use memory directly but at a fixed address and must be accessible by various apps (and scripts)
which pretty much rules out using 'malloc'.
If you believe that, it's time to re-examine the architecture of your project.
It's a simple logic analyzer to capture some "glitches" ...
So you need to watch for a trigger condition, and start collecting data once it's met. This is the "real time" part of your
application. Then there is the post processing (display, instruction dis-assembly, histograms, whatever) which does
not have to occur in "real time".
For the first part, you most certainly can malloc the RAM you need and use that. Or you can declare a local block of
RAM as part of your program, with luck, it will all fit in the processors cache. Once the data has been captured, you
save it to a file, and then the post processing can be handled.