On Linux, can I start a process (for example, using execve ) and force it to use a specific memory area as the stack space?
Background:
I have a C ++ program and a quick allocator that gives me "quick memory". I can use it for objects that use a bunch, and create them in quick memory. Good. But I also have many variables living on the stack. How can I make them use fast memory?
Idea: Introduce a “software shell” that allocates fast memory and then launches the actual main program, passing a pointer to the main memory, and the program uses it as a stack. Is it possible?
[Update]
Setting up pthread works.
ritter
source share