Skip to content

Instantly share code, notes, and snippets.

@maxlapshin
Created May 7, 2013 09:34
Show Gist options
  • Save maxlapshin/5531424 to your computer and use it in GitHub Desktop.
Save maxlapshin/5531424 to your computer and use it in GitHub Desktop.
mpegts_alloc:new(1000000). returns preallocated binary with size 1000000 that can be filled with your data.
{module, mpegts_alloc}. %% version = 0
{exports, [{module_info,0},{module_info,1},{new,1}]}.
{attributes, []}.
{labels, 7}.
{function, new, 1, 2}.
{label,1}.
{line,[{location,"mpegts_alloc.S",13}]}.
{func_info,{atom,mpegts_alloc},{atom,new},1}.
{label,2}.
{line,[{location,"mpegts_alloc.S",16}]}.
{test,is_integer,{f,1},[{x,0}]}.
{test,is_ge,{f,1},[{x,0},{integer,0}]}.
bs_init_writable.
return.
{function, module_info, 0, 4}.
{label,3}.
{line,[]}.
{func_info,{atom,t},{atom,module_info},0}.
{label,4}.
{move,{atom,t},{x,0}}.
{line,[]}.
{call_ext_only,1,{extfunc,erlang,get_module_info,1}}.
{function, module_info, 1, 6}.
{label,5}.
{line,[]}.
{func_info,{atom,t},{atom,module_info},1}.
{label,6}.
{move,{x,0},{x,1}}.
{move,{atom,t},{x,0}}.
{line,[]}.
{call_ext_only,2,{extfunc,erlang,get_module_info,2}}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment