+ 1
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.
5 Respostas
+ 9
Interesting ... try it and tell us 😂😂
+ 2
@Sun :D..:D
+ 2
Depends on the OS. Windows will simply return a null pointer once you reach 2gb
+ 1
Absolutely, especially if your program is compiled as 64 bit
0
@alex..can I crash an OS using heap and c?