I have seen many implementations of segment trees that use O(4*N) memory. Is there anyway for a segment tree to use exactly 2*N-1 memory? I cannot find any implementation that does this. Even if they talk about the space complexity being actually 2*N-1 they still allocate 4*N.
EDIT: What I mean is that for an array of n numbers you use an array of 2n-1 numbers for a segment tree. Every implementation uses an array of 2*(next power of 2 greater than n).
I know that the O notation omits constants but for a very large n it would matter if it is 2*N-1 or 4*N, thus the reason I asked this question.