How to see Linux’ view of the RAM in order to determinate the fragmentation

Memory Fragmentation When a Linux system has been running for a while memory fragmentation can increase which depends heavily on the nature of the applications that are running on it. The more processes allocate and free memory, the quicker memory becomes fragmented. And the kernel may not always be able to defragment enough memory for … Read more

How to get current CPU and RAM usage in C++?

Sadly these things rely heavily on the underlying OS, so there are no platform-independent calls. (Maybe there are some wrapper frameworks, but I don’t know of any.) On Linux you could have a look at the getrusage() function call, on Windows you can use GetProcessMemoryInfo() for RAM Usage. Have also a look at the other … Read more

How can I create a RAM disk programmatically?

ImDisk is a RAM disk app that creates a virtual drive from a sector of memory, and has an API that can be called from .NET. class RamDisk { public const string MountPoint = “X:”; public void createRamDisk() { try { string initializeDisk = “imdisk -a “; string imdiskSize = “-s 1024M “; string mountPoint … Read more

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