From 62d7cb596135c14e5c4a4d2295928810c2c0c508 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Tue, 9 Jun 2009 15:24:09 -0400 Subject: spacing MINOR --- util/allocator.h | 44 ++++++++++++++++++++++---------------------- 1 file 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 . -*/ + * 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 . + */ #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 -- cgit v1.2.1