What if i allocate my pc's full memory into a heap in c ?
If i use the entire memory of my pc in a c program ,i.e. lock down 2GB of memory in the heap segment using malloc().what will happen if I. compile the c program.
Interesting ... try it and tell us 😂😂
Depends on the OS. Windows will simply return a null pointer once you reach 2gb
Absolutely, especially if your program is compiled as 64 bit
@alex..can I crash an OS using heap and c?