News for hackers. Stuff that matters.

SairajK19

Yes, seems like you can easily run out of stack with 256 bytes. Maybe they used their own secondary stack along with the hardware stack.

I wonder how big is modern 64bit cpu stack.

Okay I get it now, upper 8bit always hard wired to be 0x01 which is also why lies in page 1. The stack pointer deals with lower 8bits from 00 to FF.

Many thanks!

That explains it well, thankyou!
Thankyou,So this means the cpu outputs data into the upper 8bits of the address and the stack pointer points to the lower 8bits?

So for example if the current top of the stack is 0x01FF then then SP will store FF, which being upper 8 bits of 0x01FF and the data will be at 01 which being lower 8bits of 0x01FF ?

Re:Writing a file system from scratch in Rust on Sunday December 03, 2023 @10:26PM (#38513410)
That explains it well. It's the number of pointers that a 4KiB block can hold. I got it.

Many thanks.

Re:Writing a file system from scratch in Rust on Sunday December 03, 2023 @09:52PM (#38513212)
Hi, I did not understand the arithmetic behind indirect pointers and the file size it can store.

It says "A single indirect pointer can point - (12 + 1024) * 4 KiB" that is 4MiB file.

My question is, what does 1024 represent. I understand 12 is the number of direct pointers and we are multiplying it by 4 considering a pointer takes 4 bytes of space. Would help if anyone explains it.

Might be a silly question, sorry about that. But ya, thanks for the help!