Issue Good morning. I hope some can help me out understanding how one aspect of virtual memory works and how C behaves. From what I understand, whenever we call malloc, C will add it to the heap, with the pointersContinue reading
[SOLVED] How to map two virtual adresses on the same physical memory on linux?
Issue I’m facing a quite tricky problem. I’m trying to get 2 virtual memory areas pointing to the same physical memory. The point is to have different page protection parameters on different memory areas. On this forum, the user seemsContinue reading
[SOLVED] Multiple threads invoking the same rand() function, how do I make them call their own instance of rand() function?
Issue I have a question about how multithreading and function calls at low-level work. If I call the rand() function from multiple threads, do they access the same function? Where is it stored in the memory? Do all threads accessContinue reading
[SOLVED] Undefined chars wrote by low-level function write() on a file
Issue Currently, as exercise, I am building a small database using C programming Language. The database will be structured as a collection of structures. Each structure contain specific elements (in this case id, username and password). In the following codeContinue reading
[SOLVED] What has a better performance: multiplication or division?
Issue Which version is faster ? x * 0.5 or x / 2 Ive had a course at the university called computer systems some time ago. From back then i remember that multiplying two values can be achieved with comparablyContinue reading