freenode/#sbcl - IRC Chatlog
Search
12:58:48
jsjolen
Hi, I'm currently going thru my OS course at uni. We get caught that there're 3 segments, heap, stack and text (which is non-extendable[?]) and of these 3 only text is executable. How does SBCL execute code if you can't extend the text segment?
13:17:22
Shinmera
Well, at least on Linux, you do have text, data, bss, heap, mmap, stack, kernel sections in memory.
13:18:42
Shinmera
Also on Linux, read up on mmap and mprotect. Basically you can give memory pages certain attributes, such as being executable.
14:18:23
jsjolen
stassats`: But I guess there's some sort of internal segmentation in that big chunk of memory since Linux reports it as such? It's just all contigious now
14:21:16
stassats`
jsjolen: the MMU maps virtual address to real addresses in the big chunk of memory
14:24:10
jsjolen
stassats`: Yeah, that I know :-). The literature I read has shown how to calc. the mapping but described the heap and stack as being discontigious
14:25:41
pkhuong_
each process/thread has an initial stack, but it's just a suggestion on linux. You can point SP anywhere you want. The heap used to refer to the region at the bottom of the address space that grew with (s)brk, but we have mmap now.