Hi, Sorry for my english. I started learn assembly again after 15 years. Now, I'm learning about memory management and sys_brk system call. I've created a really simple program, which try to extend the heap size. I've read, when sys_brk is called with the new break address(last usable address of the heap or data segment), it will be rounded up to the next nearest page, but it didn't. Am I misundestand somthing? # meminf.s # 2008.09.25. # PURPOSE: Test current_break address round up at sys_brk call .include "../sharedlibs/linux.s" .section .text .globl _start _start: movl %esp, %ebp movl $0, %ebx # %ebx = 0, get the current curret_break movl $SYS_BRK, %eax int $INT # %eax = address of current_break addl $0x1002, %eax # add 4098 to current current_break movl %eax, %ebx # %ebx = the address of the new current_break movl $SYS_BRK, %eax int $INT movl $0, %ebx # set the return value of the program movl $SYS_EXIT, %eax int $INT regards, Kiri -- To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- Follow-Ups:
- Re: Current break round up
- From: Frank Kotler
- Re: Current break round up
- Prev by Date: Re: questions about linux termios
- Next by Date: Re: Current break round up
- Previous by thread: questions about linux termios
- Next by thread: Re: Current break round up
- Index(es):