Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
23e7e565
Commit
23e7e565
authored
Aug 13, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #835 from kmod/no_attr_malloc
Remove __attribute__((__malloc__)) from the gc
parents
8e45b42d
a013784c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/gc/heap.h
src/gc/heap.h
+5
-5
No files found.
src/gc/heap.h
View file @
23e7e565
...
...
@@ -247,7 +247,7 @@ public:
#endif
}
GCAllocation
*
__attribute__
((
__malloc__
))
alloc
(
size_t
bytes
)
{
GCAllocation
*
alloc
(
size_t
bytes
)
{
registerGCManagedBytes
(
bytes
);
if
(
bytes
<=
16
)
return
_alloc
(
16
,
0
);
...
...
@@ -411,7 +411,7 @@ private:
Block
**
_freeChain
(
Block
**
head
,
std
::
vector
<
Box
*>&
weakly_referenced
);
void
_getChainStatistics
(
HeapStatistics
*
stats
,
Block
**
head
);
GCAllocation
*
_
_attribute__
((
__malloc__
))
_
alloc
(
size_t
bytes
,
int
bucket_idx
);
GCAllocation
*
_alloc
(
size_t
bytes
,
int
bucket_idx
);
};
struct
ObjLookupCache
{
...
...
@@ -485,7 +485,7 @@ public:
/* Largest object that can be allocated in a large block. */
static
constexpr
size_t
ALLOC_SIZE_LIMIT
=
BLOCK_SIZE
-
CHUNK_SIZE
-
sizeof
(
LargeObj
);
GCAllocation
*
__attribute__
((
__malloc__
))
alloc
(
size_t
bytes
);
GCAllocation
*
alloc
(
size_t
bytes
);
GCAllocation
*
realloc
(
GCAllocation
*
alloc
,
size_t
bytes
);
void
free
(
GCAllocation
*
alloc
);
...
...
@@ -506,7 +506,7 @@ class HugeArena : public Arena<HUGE_ARENA_START, ARENA_SIZE, 0, PAGE_SIZE> {
public:
HugeArena
(
Heap
*
heap
)
:
heap
(
heap
)
{}
GCAllocation
*
__attribute__
((
__malloc__
))
alloc
(
size_t
bytes
);
GCAllocation
*
alloc
(
size_t
bytes
);
GCAllocation
*
realloc
(
GCAllocation
*
alloc
,
size_t
bytes
);
void
free
(
GCAllocation
*
alloc
);
...
...
@@ -584,7 +584,7 @@ public:
return
rtn
;
}
GCAllocation
*
__attribute__
((
__malloc__
))
alloc
(
size_t
bytes
)
{
GCAllocation
*
alloc
(
size_t
bytes
)
{
if
(
bytes
>
LargeArena
::
ALLOC_SIZE_LIMIT
)
return
huge_arena
.
alloc
(
bytes
);
else
if
(
bytes
>
sizes
[
NUM_BUCKETS
-
1
])
...
...
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