Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdint.h>
- #define PAGE_SIZE sizeof(uint64_t) * 8
- #define PAGE_SIZE2 (sizeof(uint64_t) * 8)
- int main(void) {
- uint16_t slot_id = 6005;
- uint16_t page = slot_id/PAGE_SIZE;
- uint16_t page2 = slot_id/PAGE_SIZE2;
- printf("PAGE_SIZE = %d\n", PAGE_SIZE);
- printf("slot_id = %d\n", slot_id);
- printf("page = %d\n", page);
- printf("page2 = %d\n", page2);
- printf("value = %d\n", 6005/8*8);
- printf("value2 = %d\n", 6005/(8*8));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement