Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ArduinoCore-avr
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ArduinoCore-avr
Commits
742abcd9
Unverified
Commit
742abcd9
authored
Sep 16, 2019
by
Alexander Entinger
Committed by
GitHub
Sep 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #33 from Pharap/add-placement-new
Add placement new operator
parents
ffe7ae05
6a717473
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
cores/arduino/new.cpp
cores/arduino/new.cpp
+5
-0
cores/arduino/new.h
cores/arduino/new.h
+1
-0
No files found.
cores/arduino/new.cpp
View file @
742abcd9
...
...
@@ -26,6 +26,11 @@ void *operator new[](size_t size) {
return
malloc
(
size
);
}
void
*
operator
new
(
size_t
size
,
void
*
ptr
)
noexcept
{
(
void
)
size
;
return
ptr
;
}
void
operator
delete
(
void
*
ptr
)
{
free
(
ptr
);
}
...
...
cores/arduino/new.h
View file @
742abcd9
...
...
@@ -23,6 +23,7 @@
void
*
operator
new
(
size_t
size
);
void
*
operator
new
[](
size_t
size
);
void
*
operator
new
(
size_t
size
,
void
*
ptr
)
noexcept
;
void
operator
delete
(
void
*
ptr
);
void
operator
delete
[](
void
*
ptr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment