I think you are talking about alignment here.
There are no rows and columns in memory. The address space is flat. The locations are numbered from 0 to n. In a strip, like the frames in movie film.
Each location is a byte.
The processor, say a 32-bit porcessor, should have the data aligned on 32-bit boudaries for efficiency. The compilere tries to support this. So, this struct:
-
struct X
-
{
-
int a;
-
char b;
-
int c;
-
};
-
will have a on a 32-bit boudary (called a word boundary). b will also be on the next 32-bit boundary. But b is just one bye. Therefore, the compiler will add three pad bytes after b so that c is aligned on a 32-bit boundary.
This is to say the sizeof a struct ns not necessarily the same as the sum of the sizes of its members.
All of this is logical mapping and has no relation to the physical memory location. The OS will convert the logical addresses to the physical addresses.