Why 64 bit mode ( Long mode ) doesn’t use segment registers?

In a manner of speaking, when you perform array (“indexed”) type addressing with general registers, you are doing essentially the same thing as the segment registers. In the bad old days of 8-bit and 16-bit programming, many applications required much more data (and occasionally more code) than a 16-bit address could reach. So many CPUs … Read more

Garbage collection and memory management in Erlang

To classify things, lets define the memory layout and then talk about how GC works. Memory Layout In Erlang, each thread of execution is called a process. Each process has its own memory and that memory layout consists of three parts: Process Control Block, Stack and Heap. PCB: Process Control Block holds information like process … Read more

Differences or similarities between Segmented paging and Paged segmentation?

So,after vigorously searching on net for the difference or similarity between these two terms,I have come up on a final answer.First of all I would write down the similarities: They both (segmented paging and paged segmentation) are a type of paging/segmentation combined systems (Paging and Segmentation can be combined by dividing each segment into pages). … Read more

segmentation fault vs page fault

These two things are very dissimilar, actually. A segmentation fault means a program tried to access an invalid or illegal memory address: for example, 0, or a value larger than any valid pointer. A page fault is when a pointer tries to access a page of address space that’s currently not mapped onto physical memory, … Read more

Does Rust’s memory management result in fragmented memory?

TL;DR: Most programs will never have to worry about fragmentation in C, C++ or Rust. Those which do will have to handle it by themselves. Does the Rust programming language’s automatic memory management need to reclaim fragmented memory? Rust does not have automatic memory management; it has manual memory management which the compiler checks for … Read more

What is the difference in Swift between ‘unowned(safe)’ and ‘unowned(unsafe)’?

From what I understand, although I can’t find a definitive source from Apple, unowned can be broken into two flavors, safe and unsafe. A bare unowned is unowned(safe): it is a specially wrapped reference which will throw an exception when a dealloced instance is referenced. The special case is unowned(unsafe): it is the Swift equivalent … Read more

Difference between logical addresses, and physical addresses?

This answer is by no means exhaustive but it may explain it enough to make things click. In virtual memory systems, there is a disconnect between logical and physical addresses. An application can be given a virtual address space of (let’s say) 4G. This is its usable memory and it’s free to use it as … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)