Groups
Groups
Sign in
Groups
Groups
ats-lang-users
Conversations
Labels
About
Send feedback
Help
Use one's own malloc/free
44 views
Skip to first unread message
gmhwxi
unread,
Jan 4, 2014, 2:21:13 AM
1/4/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ats-lan...@googlegroups.com
Here is an example showing a simple way to use user-defined malloc/free:
https://github.com/githwxi/ATS-Postiats/tree/master/doc/EXAMPLE/CA-HSR2/program-1-2
The flag
-DATS_MEMALLOC_USER
indicates to the ATS compiler that the following
two functions are used for memory allocation/deallocation:
extern
void
*
atsruntime_malloc_user
(
size_t
bsz
) ;
extern
void
atsruntime_mfree_user
(
void
*
ptr
)
;
Reply all
Reply to author
Forward
0 new messages