vsip::Vector and mlock

Gaetano Mendola gmendola at mbigroup.it
Thu Nov 6 11:54:15 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,
in my application I'm used to do something like:

std::vector<T> myVector;
...
mlock(&myVector[0], sizeof(t)*myVector.size());

yes I know, c++98 doesn't guaranteed that all elements
in std::vector at contiguous memory location but c++03 does
and anyway all stl implemantation I know guarantees it.

I need to do the same with vsip::vector<T> becouse I'm
replacing in my application that std::vector with a
vsip::Vector (I need to perform an FFT on it), is it
safe do:

vsip::Vector<T> myVector;
...
mlock(&myVector(0), sizeof(t)*myVector.size());


Regards
Gaetano Mendola

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJEtrn7UpzwH2SGd4RAu29AKDUC6SqTd/qi7DO13cY71sIYtT1CgCg+T3J
NssISFsOl7w0rTvaMEQ6qdY=
=jY/9
-----END PGP SIGNATURE-----



More information about the vsipl++ mailing list