Live data from Hacker News

Folly - The Faceboook open source library

facebook.com

41–44 of 44 posts

Re: Folly - The Faceboook open source library

#41
post #22

Earlier quoted context omitted.

Hmm, I recently created a private memory allocator so the discussion on the page is somewhat interesting... Only a tiny minority of objects are genuinely non-relocatable: Hmm, I'm not exactly what is meant here. Moving a block of memory from here to there in the most general case will leave your pointers dangling and crash you in no short order. Things that pointed to the data you moved just don't any more. If you ar…

If your object is in a vector, it's already possible for the vector to move the object without updating any pointers to it. The only question is whether it is safe for the vector to move the object with memmove instead of invoking a copy/move constructor, essentially skipping the step of telling the object that it is being moved. This will only fail if the object contains pointers to its own sub-objects (or the move…

Could you elaborate at all on what it means to put an object in a vector/why you would want to do that?

Re: Folly - The Faceboook open source library

#42
post #23

Earlier quoted context omitted.

That's all good and well, but I'm not sure I understand what it brings compared to std::vector with a good allocator. In addition, it does not support concurrent growth.

- It adjusts its growth strategy to work well with the properties of the allocator. - It requires that its members be relocatable and uses memmove to speed up move operations.

1 - Can be done from the allocator; 2 - I don't think it's useful with rvalues references. It also sounds like you want to use std::list...

Re: Folly - The Faceboook open source library

#43

This is a conspiracy theory, but what if there are bugs in it that they can't find and so they're open sourcing it in the hope that someone else will fix it.

Not the main purpose, obviously, but if you find any bugs, I'll be more than happy to take a look.
Post reply on HN