[fpc-pascal] Coroutines and VirtualAlloc

Daniel Gaspary dgaspary at gmail.com
Tue Apr 18 21:34:57 CEST 2017

On Sat, Apr 15, 2017 at 6:20 AM, Ryan Joseph <ryan at thealchemistguild.com> wrote:
> I was curious about possible ways coroutines could work in FPC and found this example that claims to implement just that. It appears to be designed for Windows though and makes use of a function called VirtualAlloc which I don’t understand. Is there a non platform specific version of this function? I’d like to test the code but I have no idea what that function does or how to replace it.

Using  SetJmp and LongJmp?

I believe some months ago it was a discussion on the list on why this
was not really the way to implement coroutines.

Searching for longjmp/setjmp you can find the thread, I guess.

More information about the fpc-pascal mailing list