Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3046512
refs.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
437 B
Referenced Files
None
Subscribers
None
refs.c
View Options
#include
"internal.h"
#include
"gc/refs.h"
#include
<stdlib.h>
void
gc_refs_shrink
(
ant_t
*
js
)
{
if
(
!
js
||
js
->
prop_refs_cap
<=
512
)
return
;
if
(
js
->
prop_refs_len
>=
js
->
prop_refs_cap
/
4
)
return
;
ant_offset_t
shrunk
=
js
->
prop_refs_len
<
256
?
256
:
js
->
prop_refs_len
*
2
;
ant_prop_ref_t
*
next
=
realloc
(
js
->
prop_refs
,
sizeof
(
*
next
)
*
shrunk
);
if
(
next
)
{
js
->
prop_refs
=
next
;
js
->
prop_refs_cap
=
shrunk
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Apr 3, 12:52 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
520466
Default Alt Text
refs.c (437 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment