Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Issue 194040: Fix realloc to not call the new_handler (which is for failures)... (Closed)

Created:
11 years, 3 months ago by Mike Belshe
Modified:
9 years, 5 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix realloc to not call the new_handler (which is for failures) when the request was for realloc(ptr, 0). Calling realloc(ptr, 0) is valid, and we should delete ptr and return NULL. BUG=none TEST=none

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M third_party/tcmalloc/allocator_shim.cc View 1 2 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Mike Belshe
11 years, 3 months ago (2009-09-08 08:36:25 UTC) #1
jar (doing other things)
http://codereview.chromium.org/194040/diff/2001/2002 File third_party/tcmalloc/allocator_shim.cc (right): http://codereview.chromium.org/194040/diff/2001/2002#newcode163 Line 163: // realloc should free the ptr and return ...
11 years, 3 months ago (2009-09-08 16:03:52 UTC) #2
jar (doing other things)
11 years, 3 months ago (2009-09-08 16:04:31 UTC) #3
With the nit/comment adjusted as per previous review.... LGTM.

Powered by Google App Engine
This is Rietveld 408576698