repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
drd/tests/sem_open: Change the semaphore name (#331839)
[valgrind.git]
/
memcheck
/
tests
/
new_nothrow.cpp
blob
82e5bc51416ac2e5845b85d6743ab22793e4003b
1
#include <new>
2
3
// At one point, Valgrind wasn't overriding these 'nothrow' versions; since
4
// they call malloc(), the calls to 'delete' caused bogus mismatch errors.
5
6
int
main
()
7
{
8
int
*
a
=
new
(
std
::
nothrow
)
int
;
9
int
*
b
=
new
(
std
::
nothrow
)
int
[
5
];
10
delete
a
;
11
delete
[]
b
;
12
}
13