folly.git
12 years agofbstring: remove reference to /home/engshare/ paths
Andrew Gallagher [Tue, 5 Jun 2012 23:13:31 +0000 (16:13 -0700)]
fbstring: remove reference to /home/engshare/ paths

Summary: Reported by https://github.com/facebook/folly/issues/8

Test Plan: no

Reviewed By: tudorb@fb.com

FB internal diff: D487572

12 years agoFix some memory_order parameters in AtomicHashMap
Jordan DeLong [Sun, 3 Jun 2012 21:58:50 +0000 (14:58 -0700)]
Fix some memory_order parameters in AtomicHashMap

Summary: Herb Sutter noticed an error in the AHM find pseudo-code at
the C++ conference, and the error is in the real implementation too.
We should be using memory_order_acquire, because we need the load of
the key to happen before any subsequent loads of the value itself.
Our implementation is conservative for a memory_order_relaxed load
(we generate the same code as if it were memory_order_acquire---i.e. a
compiler barrier but no memory barriers), so this should not change the
generated code.  Correctness is a good idea, though (when we upgrade
to gcc 4.7's atomics it might not be as conservative).  Also, erase was
doing three loads when one is enough.  ... also fixes an exception safety
bug in insert.  (Phew.)

Test Plan: Ran the AHM unit tests, debug and opt.

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D485744

12 years agoSome typos corrects, and collapsed the two descriptions of Bits.h into one.
Christopher C. Aycock [Sun, 3 Jun 2012 03:59:02 +0000 (00:59 -0300)]
Some typos corrects, and collapsed the two descriptions of Bits.h into one.

Summary: https://github.com/facebook/folly/pull/1

Test Plan: N/A.

Reviewed By: andrewjcg@fb.com

FB internal diff: D485738

12 years agoAdd #include <new> to folly/Malloc.h.
Tudor Bosman [Tue, 5 Jun 2012 07:04:29 +0000 (00:04 -0700)]
Add #include <new> to folly/Malloc.h.

Test Plan: folly tests

Reviewed By: philipp@fb.com, andrei.alexandrescu@fb.com

FB internal diff: D486884D487376

12 years agoCheck the return value from malloc / realloc.
Tudor Bosman [Tue, 5 Jun 2012 05:24:21 +0000 (22:24 -0700)]
Check the return value from malloc / realloc.

Summary:
https://github.com/facebook/folly/issues/7

Wrappers: checkedMalloc / checkedRealloc / checkedCalloc

Test Plan: all folly tests

FB internal diff: D486841

12 years agoFix error in ProducerQueue::isEmpty
Michael Curtiss [Tue, 5 Jun 2012 05:16:44 +0000 (22:16 -0700)]
Fix error in ProducerQueue::isEmpty

Summary:
Oops.

Also: documented the slightly confusing behavior w.r.t. 'size'.

Test Plan: Added a unit test.

Reviewers: tjackson, jdelong

Reviewed By: jdelong

CC: folly@lists, lr, bagashe
Differential Revision: https://phabricator.fb.com/D486832

12 years agoTypos.
Tudor Bosman [Tue, 5 Jun 2012 02:50:18 +0000 (19:50 -0700)]
Typos.

Summary:
As pointed out by orbitcowboy at
https://github.com/facebook/folly/issues/6

Test Plan: No

Reviewers: jdelong, aalexandre

Reviewed By: jdelong

CC: folly@lists, bagashe
Differential Revision: https://phabricator.fb.com/D486754

12 years agoMove LICENCE and README to top level directory
Jordan DeLong [Sun, 3 Jun 2012 22:34:03 +0000 (15:34 -0700)]
Move LICENCE and README to top level directory

Summary: For the public version of the repo.

Test Plan: N/A.

12 years agoadd a .gitignore and remove folly-config.h (generated file) from the repo
Chip Turner [Sun, 3 Jun 2012 04:23:59 +0000 (21:23 -0700)]
add a .gitignore and remove folly-config.h (generated file) from the repo

12 years agoAdding support for in-place use of ProducerConsumerQueue.
Tom Jackson [Mon, 4 Jun 2012 23:57:49 +0000 (16:57 -0700)]
Adding support for in-place use of ProducerConsumerQueue.

Summary: As it is, ProducerConsumerQueue requires that values are moved or copied on the way out of the queue. It would be nice if it was possible to get a reference to the front of the queue, use it in place, then destruct it.

Test Plan: Unit tests

FB internal diff: D484538

12 years agoAdd a LICENSE file for folly
Jordan DeLong [Sun, 3 Jun 2012 02:43:28 +0000 (19:43 -0700)]
Add a LICENSE file for folly

Summary: Adds a copy of the apache license 2.0.

Test Plan: None.

12 years agoUpdate the folly/README
Jordan DeLong [Sat, 2 Jun 2012 23:13:53 +0000 (16:13 -0700)]
Update the folly/README

Summary: Now that we have an Overview.md.

Test Plan: None.

12 years agoPull from FB rev 63ce89e2f2301e6bba44a111cc7d4218022156f6
Jordan DeLong [Sat, 2 Jun 2012 18:19:29 +0000 (11:19 -0700)]
Pull from FB rev 63ce89e2f2301e6bba44a111cc7d4218022156f6

12 years agoinitial
Jordan DeLong [Fri, 1 Jun 2012 21:00:42 +0000 (14:00 -0700)]
initial