|
|
@ -39,11 +39,11 @@ struct memSegment |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* I found this at stanford.edu: |
|
|
|
|
|
|
|
|
* I found this at stanford.edu: |
|
|
* https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup |
|
|
* https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup |
|
|
* |
|
|
* |
|
|
* Really cool way of dealing with this. The oneat stanford.edu is slightly |
|
|
* Really cool way of dealing with this. The oneat stanford.edu is slightly |
|
|
* different as ist deals only with 32bit values. I need a 64bit version |
|
|
|
|
|
|
|
|
* different as ist deals only with 32bit values. I need a 64bit version |
|
|
* because on a 64bit system size_t is also 64bit and thus it is possible |
|
|
* because on a 64bit system size_t is also 64bit and thus it is possible |
|
|
* to allocate that much amount of memory theoretically. |
|
|
* to allocate that much amount of memory theoretically. |
|
|
*/ |
|
|
*/ |
|
|
|