Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memmgr_heap_page_allocn() return non-present page #420

Open
msdx321 opened this issue May 24, 2021 · 0 comments
Open

memmgr_heap_page_allocn() return non-present page #420

msdx321 opened this issue May 24, 2021 · 0 comments

Comments

@msdx321
Copy link
Member

msdx321 commented May 24, 2021

Code

blk *ram_backend;

ram_backend = (blk *)memmgr_heap_page_allocn(4096); // return 0x546000
memcpy(&ram_backend[offset], smem_table[i].__blockdev_s_smem_pool,
			       length * BLOCKDEV_RAMDISK_BSIZE); // at 0x404c7e

Console Output

(CPU0:) registers:
(CPU0:) General registers-> EAX: 546000, EBX: 0, ECX: 400, EDX: 1000
(CPU0:) Segment registers-> CS: 1b, DS: 23, ES: 23, FS: 23, GS: 33, SS: 23
(CPU0:) Index registers-> ESI: 455000, EDI: 546000, EIP: 404c7e, ESP: 41afa8, EBP: 41afcc
(CPU0:) Indicator-> EFLAGS: 3206
(CPU0:) (Exception Error Code-> ORIG_AX: 6)
(0) FAULT: Page Fault in thd 8 (not-present write-fault user-mode  ) @ 0x546000, ip 0x404c7e

Link to the function

memmgr_heap_page_allocn(unsigned long num_pages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant