Just wondering, because I can't figure out a way to test this. Imagine the scenario whereby I have 10 bytes of memory
- I malloc varA with 5 bytes
- Assign a string with 7 characters (which use up 8 bytes)
- I malloc varB with 5 bytes
Will the program run into an error? Or just end up with gibberish memory?
Does the behaviour varies from a c/c++ and a cuda program?
SIZEand you don't overstep it. So it has both a beginning and an ending.