mirror of
https://github.com/NixOS/nix.git
synced 2025-11-19 16:59:35 +01:00
* Use a proper namespace.
* Optimise header file usage a bit. * Compile the parser as C++.
This commit is contained in:
parent
aab8812732
commit
75068e7d75
61 changed files with 650 additions and 268 deletions
|
|
@ -1,9 +1,14 @@
|
|||
#include "aterm-map.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
||||
static const unsigned int maxLoadFactor = /* 1 / */ 3;
|
||||
static unsigned int nrResizes = 0;
|
||||
static unsigned int sizeTotalAlloc = 0;
|
||||
|
|
@ -214,10 +219,11 @@ unsigned int ATermMap::size()
|
|||
}
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void printATermMapStats()
|
||||
{
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
|
||||
cerr << "RESIZES: " << nrResizes << " "
|
||||
<< sizeTotalAlloc << " "
|
||||
<< sizeCurAlloc << " "
|
||||
|
|
@ -319,3 +325,6 @@ int main(int argc, char * * argv)
|
|||
printATermMapStats();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue