Skip to content

Tag: memory

Where is the memusage command in Ubuntu? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …

How to get Resident Set Size (RSS)

I need to know physical memory consumption of my Go process in Linux. What I need is Resident Set Size (RSS). runtime.ReadMemStats is not suitable because there is no way to get a size of a portion of a virtual memory that is resident. syscall.Getrusage is not suitable because it returns only Maxrss that is m…

Will process load into memory with 4 or 8 alignment rule

I just learnt about 4 or 8 memory alignment and came about this question. Will Memory alignment happen in virtual memory space or absolute addresss? I guess the answer is virtual memory space, and the os will load the process to the position that the absolute address ends with ‘0X00’ or ‘0X0…

How can i get memory usage by a process in freeRTOS

As we all know, we can get RAM currently used by a process in Linux using commands like ps, top and vmstat or reading the pseudo-filesystem /proc. But how can i get the same information in freeRTOS where we could not use commands and there exist no file system. Answer First there’s no process context in…

Dynamic expansion of the Linux stack

I’ve noticed the Linux stack starts small and expands with page faults caused by recursion/pushes/vlas up to size getrlimit(RLIMIT_STACK,…), give or take (defaults to 8MiB on my system). Curiously though, if I cause page faults by addressing bytes directly, within the limit, Linux will just regula…

Finding mapped memory from inside a process

Setup: Ubuntu 18×64 x86_64 application Arbitrary code execution from inside the application I’m trying to write code which should be able to find structures in memory even with ASLR enabled. Sadly, I couldn’t find any static references to those regions, so I’m guessing I have to use the…