Allocate memory pages lazarus / 66-Unix ---------------------------------------------------------------------- LemonParty · 2025-02-27 14:46 In Windows we have VirtualAlloc function for allocate memory pages. What is used in UNIX? ---------------------------------------------------------------------- H₂SO₄ · 2025-02-27 14:50 mmap,  and  mprotect  is analogous to  VirtualProtect ---------------------------------------------------------------------- LemonParty · 2025-02-27 15:14 So if I want just memory I have to pass 0 to fd and offset arguments of mmap? ---------------------------------------------------------------------- MarkMLl · 2025-02-27 16:04 Quote from: LemonParty on February 27, 2025, 04:14:43 pmSo if I want just memory I have to pass 0 to fd and offset arguments of mmap? There's an example at https://www.freepascal.org/docs- html/current/rtl/baseunix/fpmmap.html which suggests that it's not that simple. I've not used it ** , and suggest that you look for online examples- even if (shock! Horror!!) they're written in C etc. ** I've not used it in Pascal. I've used it in some C-based video stuff, but was doing so by rote based on existing code and there is absolutely no way I'd set myself up as an expert. I believe it's covered by POSIX, so examples should be fairly portable. MarkMLl ---------------------------------------------------------------------- LemonParty · 2025-02-27 16:52 Seems work. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Fpmmap(nil, Size, PROT_EXEC or PROT_READ or PROT_WRITE, MAP_SHARED or MAP_ANONYMOUS, -1, 0)MAP_ANONYMOUS should be specified if no need to map to a file.