mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Enable namespaces
This commit is contained in:
parent
fc6e9e82c6
commit
726a9345ff
|
@ -65,3 +65,9 @@ In the end, the performance of PFFFT library it is outlined by the output.*
|
||||||
|
|
||||||
Solution: using "sapi::v::RemotePtr" instead of "sapi::v::GenericPtr"
|
Solution: using "sapi::v::RemotePtr" instead of "sapi::v::GenericPtr"
|
||||||
to access the memory of object s
|
to access the memory of object s
|
||||||
|
|
||||||
|
- [Unresolved] compiling bug: "No spave left on device"
|
||||||
|
The building process creates some `embed` files that use lots of
|
||||||
|
memory, trying to write them on /tmp.
|
||||||
|
|
||||||
|
Temporary solution: clean /tmp directory by `sudo rm -rf /tmp/*`.
|
|
@ -34,7 +34,6 @@ class pffftSapiSandbox : public pffftSandbox {
|
||||||
__NR_close,
|
__NR_close,
|
||||||
__NR_getrusage,
|
__NR_getrusage,
|
||||||
})
|
})
|
||||||
.DisableNamespaces()
|
|
||||||
.BuildOrDie();
|
.BuildOrDie();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -83,12 +82,12 @@ int main(int argc, char* argv[]) {
|
||||||
16384, 32768, 256 * 1024, 1024 * 1024, -1};
|
16384, 32768, 256 * 1024, 1024 * 1024, -1};
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
VLOG(1) << "Initializing sandbox...\n";
|
LOG(INFO) << "Initializing sandbox...\n";
|
||||||
|
|
||||||
pffftSapiSandbox sandbox;
|
pffftSapiSandbox sandbox;
|
||||||
sandbox.Init().IgnoreError();
|
sandbox.Init().IgnoreError();
|
||||||
|
|
||||||
VLOG(1) << "Initialization: " << sandbox.Init().ToString().c_str() << "\n";
|
LOG(INFO) << "Initialization: " << sandbox.Init().ToString().c_str() << "\n";
|
||||||
|
|
||||||
pffftApi api(&sandbox);
|
pffftApi api(&sandbox);
|
||||||
|
|
||||||
|
@ -174,7 +173,7 @@ int main(int argc, char* argv[]) {
|
||||||
sapi::StatusOr<PFFFT_Setup*> s =
|
sapi::StatusOr<PFFFT_Setup*> s =
|
||||||
api.pffft_new_setup(N, cplx ? PFFFT_COMPLEX : PFFFT_REAL);
|
api.pffft_new_setup(N, cplx ? PFFFT_COMPLEX : PFFFT_REAL);
|
||||||
|
|
||||||
VLOG(1) << "Setup status is: " << s.status().ToString().c_str() << "\n";
|
LOG(INFO) << "Setup status is: " << s.status().ToString().c_str() << "\n";
|
||||||
|
|
||||||
if (s.ok()) {
|
if (s.ok()) {
|
||||||
sapi::v::RemotePtr s_reg(s.value());
|
sapi::v::RemotePtr s_reg(s.value());
|
||||||
|
@ -197,7 +196,7 @@ int main(int argc, char* argv[]) {
|
||||||
show_output("PFFFT", N, cplx, flops, t0, t1, max_iter);
|
show_output("PFFFT", N, cplx, flops, t0, t1, max_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
VLOG(1) << "N = " << N << " SUCCESSFULLY\n\n";
|
LOG(INFO) << "N = " << N << " SUCCESSFULLY\n\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user