"Fossies" - the Fresh Open Source Software Archive

Member "Hoard-3.13/src/source/uselibhoard.cpp" (2 Jan 2019, 1456 Bytes) of package /linux/misc/Hoard-3.13.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "uselibhoard.cpp" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.12_vs_3.13.

    1 /* -*- C++ -*- */
    2 
    3 /*
    4   The Hoard Multiprocessor Memory Allocator
    5   www.hoard.org
    6 
    7   Author: Emery Berger, http://www.emeryberger.org
    8  
    9   Copyright (c) 1998-2019 Emery Berger
   10 
   11   This program is free software; you can redistribute it and/or modify
   12   it under the terms of the GNU General Public License as published by
   13   the Free Software Foundation; either version 2 of the License, or
   14   (at your option) any later version.
   15   
   16   This program is distributed in the hope that it will be useful,
   17   but WITHOUT ANY WARRANTY; without even the implied warranty of
   18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   19   GNU General Public License for more details.
   20   
   21   You should have received a copy of the GNU General Public License
   22   along with this program; if not, write to the Free Software
   23   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   24 
   25 */
   26 
   27 // Link this code with your executable to use winhoard.
   28 
   29 #if defined(_WIN32)
   30 
   31 #include <windows.h>
   32 //#include <iostream>
   33 
   34 #if defined(_WIN64)
   35 #pragma comment(linker, "/include:ReferenceHoard")
   36 #else
   37 #pragma comment(linker, "/include:_ReferenceHoard")
   38 #endif
   39 
   40 extern "C" {
   41 
   42   __declspec(dllimport) int ReferenceWinWrapperStub;
   43   
   44   void ReferenceHoard()
   45   {
   46     LoadLibraryA ("libhoard.dll");
   47 #if 0
   48     if (lib == NULL) {
   49       std::cerr << "Startup error code = " << GetLastError() << std::endl;
   50       abort();
   51     }
   52 #endif
   53     ReferenceWinWrapperStub = 1; 
   54   }
   55 
   56 }
   57 
   58 #endif