[{"data":1,"prerenderedAt":163},["ShallowReactive",2],{"project-10375858":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":32,"aspects":33,"strip":35,"post_text":29,"what":36,"said":52,"maker_in_thread":91,"shape":99,"grid":103,"attempts":126,"same_week":127,"maker_shows":155,"maker_hidden":156,"reader_version":157,"card":158},"10375858","rt0","Tiny C runtime Linux (rt0), HelloWorld 0.6k (i386), sbrk example added","title","Show HN: Tiny C runtime Linux (rt0), HelloWorld 0.6k (i386), sbrk example added","https:\u002F\u002Fgithub.com\u002Flpsantil\u002Frt0\u002Fblob\u002F65b4d966409ee24ddae0d4915368542537035c81\u002FSTATS.md","github.com","oso2k",1444670364,2015,49,10,574,2565,23,"shown","languages","c runtime","library",[21,24,25,26,27],"linux","sbrk","newlib porting","i386","quiet",null,{"positive":31,"neutral":31,"mixed":31,"critical":32},0,1,{"idea":34},{"positive":31,"critical":32},[31,32,31,31,31,31,31,31,31,31],{"problem":29,"audience":29,"pricing":29,"motivation":37,"time_to_build":29,"stack":44,"openness":51,"stage":51,"team_size":51},{"value":38,"source":39,"evidence":40},"Personal goal to show how to implement basic newlib porting requirements","maker",[41],{"id":42,"by":11,"text":43},"10377480","I agree that sbrk\u002Fbrk are nearly deprecated. But not all allocators I studied use mprotect or mmap. Most reference material (old OS books & blogs) still refer to sbrk\u002Fbrk and\u002For…",[45],{"value":46,"source":47,"evidence":48},"C","inferred",[49],{"id":50},"post","unknown",{"praise":53,"objections":54,"requests":73,"questions":74,"alternatives":85},[],[55,67],{"value":56,"source":57,"evidence":58},"sbrk is nearly deprecated; mmap or mprotect preferred by modern allocators","commenter",[59,63],{"id":60,"by":61,"text":62},"10377419","duaneb","What is sbrk even used for anymore? Surely most heap allocators use mmap\u002Fmprotect directly these days. There's no downside. EDIT: Not trying to rain on anyone's parade, I think…",{"id":64,"by":65,"text":66},"10377485","koenigdavidmj","sbrk competes with mmap, not mprotect. And yes, I would expect mmap to be used in most modern systems. OS X, for instance, just emulates sbrk with a large static buffer, and it…",{"value":68,"source":57,"evidence":69},"sbrk makes less sense with virtual memory",[70],{"id":71,"by":61,"text":72},"10377717","Yea, sbrk makes sense in a flat address space. I don't think it makes as much sense with virtual memory.",[],[75,79],{"value":76,"source":57,"evidence":77},"What is sbrk used for anymore?",[78],{"id":60,"by":61,"text":62},{"value":80,"source":57,"evidence":81},"How does virtual memory improve security?",[82],{"id":83,"by":11,"text":84},"10383181","Could you explain how virtual memory makes a process more secure? My intuition is that it would be another source of contention to manage (like CPU, RAM, IO, etc). Maybe you're…",[86],{"value":87,"source":57,"evidence":88},"mmap",[89,90],{"id":60,"by":61,"text":62},{"id":64,"by":65,"text":66},{"comments":92,"answered":32,"key":93},4,[94,97,98],{"id":95,"text":96},"10375873","Original HN announcement\u002Fdiscussion [https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=8974024]. CFLAGS additions produce smaller binaries. HelloWorld in 608 bytes (i386) and 792 bytes…",{"id":42,"text":43},{"id":83,"text":84},{"commenters":92,"max_depth":100,"maker_replies":92,"first_comment_mins":101,"lifespan_hours":102},6,3,27,[104,106,108,110,111,115,118,120,121,124],[95,31,31,105,11,32],"maker\u002Fneutral\u002Fexecution",[60,32,32,107,61,31],"project\u002Fcritical\u002Fidea",[42,32,31,109,11,32],"commenter\u002Fneutral\u002Fidea",[71,32,31,109,61,31],[112,32,31,113,114,31],"10377827","other\u002Fneutral\u002Fnone","gull",[116,32,31,117,61,31],"10377986","other\u002Fneutral\u002Fprivacy",[83,32,31,119,11,32],"commenter\u002Fneutral\u002Fprivacy",[64,32,31,109,65,31],[122,32,31,123,11,32],"10377509","commenter\u002Fneutral\u002Fnone",[125,32,31,123,61,31],"10377700",[],[128,133,137,141,146,150],{"id":129,"name":130,"points":131,"category":132},"10376468","Exposé",548,"dev_tools",{"id":134,"name":135,"points":136,"category":132},"10355030","Instant Music Downloader",321,{"id":138,"name":139,"points":140,"category":132},"10375154","ureq",146,{"id":142,"name":143,"points":144,"category":145},"10353285","Wriber",128,"productivity",{"id":147,"name":148,"points":149,"category":20},"10384653","Rune.js",92,{"id":151,"name":152,"points":153,"category":154},"10378023","Lexika",85,"ai",2,false,"v2",{"id":159,"name":5,"line":6,"ai":156,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":160,"maker":11,"domain":10,"tier":19,"attempts":31,"strip":161,"url":9,"mix":162,"praise":-1,"objection":56,"sub":21},10375858,[21,24,25,26,27],"0100000000",[31,31,31,32],1794036536481]