Guest User

Programm Noob

a guest
Sep 26th, 2010
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. So verarbeite ich die Memory map
  2.  
  3. mmmap_t *mmap = (mmmap_entry_t *)0x1000;
  4.  
  5. while (mmap->size != 0)
  6. {
  7. if (mmap->type == 1)
  8. {
  9. uintptr_t addr = mmap->base;
  10. uintptr_t end_addr = addr + mmap->size;
  11.  
  12. while (addr < end_addr)
  13. {
  14. p_mm_free(addr);
  15. addr += 0x1000;
  16. }
  17. }
  18. mmap++;
  19. }
  20.  
  21.  
  22. Tas ist meine struct mmmap_t
  23.  
  24. typedef struct
  25. {
  26. uint64_t base
  27. uint64_t size
  28. uint32_t type
  29. uint32_t ext
  30. }__attribute__((packed)) mmmap_t;
Advertisement
Add Comment
Please, Sign In to add comment