diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-06-09 15:24:09 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-06-09 15:24:09 -0400 |
commit | 62d7cb596135c14e5c4a4d2295928810c2c0c508 (patch) | |
tree | 0ceb95ce14913c6a247f6af2cde1ba9c1e302e2b | |
parent | 4e4dd60185ba8f9b181cfacc4e218ea8d09da511 (diff) | |
download | mongo-62d7cb596135c14e5c4a4d2295928810c2c0c508.tar.gz |
spacing MINOR
-rw-r--r-- | util/allocator.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/util/allocator.h b/util/allocator.h index ec8c6c92ba7..cc75fb0d197 100644 --- a/util/allocator.h +++ b/util/allocator.h @@ -1,46 +1,46 @@ // allocator.h /** -* Copyright (C) 2008 10gen Inc. -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License, version 3, -* as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * Copyright (C) 2008 10gen Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #pragma once namespace mongo { - + void dbexit(int returnCode, const char *whyMsg); - + inline void * ourmalloc(size_t size) { void *x = malloc(size); if ( x == 0 ) dbexit(42, "malloc fails"); return x; } - + inline void * ourrealloc(void *ptr, size_t size) { void *x = realloc(ptr, size); if ( x == 0 ) dbexit(43, "realloc fails"); return x; } - + #define malloc mongo::ourmalloc #define realloc mongo::ourrealloc - + #if defined(_WIN32) inline void our_debug_free(void *p) { #if 0 -// this is not safe if you malloc < 4 bytes so we don't use anymore + // this is not safe if you malloc < 4 bytes so we don't use anymore unsigned *u = (unsigned *) p; u[0] = 0xEEEEEEEE; #endif @@ -48,5 +48,5 @@ namespace mongo { } #define free our_debug_free #endif - -} // namespace mongo
\ No newline at end of file + +} // namespace mongo |