toku_db_set_* (the dbt setting functions)
no longer require atomicity for ENOMEM cases.
Also, in the case of realloc, we only alloc new memory if
the new size is larger than the old size, or the new size is less than
half of the old size.
Code has some simplifications due to lesser atomicity requirements.
Modified src/tests/test_db_dbt_mem_behavior.c to take into account
that DB_DBT_REALLOC now uses the ulen field.
git-svn-id: file:///svn/tokudb@4504 c7de825b-a66e-492c-adef-691d508d4ae1
Removed extra mallocs and memcopies for toku_c_get
when the dbts use anything other than DB_DBT_USERMEM
git-svn-id: file:///svn/tokudb@4121 c7de825b-a66e-492c-adef-691d508d4ae1
We were reading error codes of malloc incorrectly.
errno is not valid unless you know you had an error.
git-svn-id: file:///svn/tokudb@3138 c7de825b-a66e-492c-adef-691d508d4ae1
We never touch ulen. If DB_DBT_USERMEM and ulen is too small, we set size, (do not write anything)
and return DB_BUFFER_SMALL.
This includes test_db_dbt_mem_behavior.c
Closes#146
git-svn-id: file:///svn/tokudb@1034 c7de825b-a66e-492c-adef-691d508d4ae1