#std.mem.Allocator.realloc
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
I don't understand why std.mem.Allocator.realloc behaves weird in some cases. I have a buffer with content of type f64. Trying to grow the buffer using realloc throws out half the content half of the time.
Are there better reallocating utilities in the std with more deterministic behaviour?
realloc should only throw out data when you request a smaller size
Do you have an example/repro case? This sounds very strange and I'm wondering if you're program has some illegal behaviour somewhere in it.