snazzy-d / sdc

The Snazzy D Compiler
MIT License
246 stars 55 forks source link

extend() #286

Closed dsm9000 closed 1 year ago

dsm9000 commented 1 year ago

extend() attempts to extend an alloc by a given length. If the alloc is not appendable, or there is insufficient capacity, null is returned. If succeeds, returns a pointer to the newly-available memory.

deadalnix commented 1 year ago

The code now looks good, but the test is a bit all over the place and it's hard to figure out if all bases are covered. Generally, less comments and more asserts would be beneficial.

deadalnix commented 1 year ago

I think you have one test case missing and you are good to go. When testing a limit, you want to check both sides of it.