search for: allocate_str

Displaying 6 results from an estimated 6 matches for "allocate_str".

Did you mean: allocate_dtv
2012 May 25
1
[LLVMdev] alloc_size metadata
...klunky? > > basically it feels like "I only know about C, here's something that > pretends to > be general but only handles C". Consider a language with a string type that > contains the string length as well as the characters. It has a > library function > allocate_string(length). How much does it allocate? length+4 > bytes. That can't > be represented by alloc_size. What's more, it may well store the > length at the > start, and return a pointer to just after the length: a pointer to the first > character. alloc_size can't repr...
2012 May 25
0
[LLVMdev] alloc_size metadata
...is fine with me. What about them feels klunky? basically it feels like "I only know about C, here's something that pretends to be general but only handles C". Consider a language with a string type that contains the string length as well as the characters. It has a library function allocate_string(length). How much does it allocate? length+4 bytes. That can't be represented by alloc_size. What's more, it may well store the length at the start, and return a pointer to just after the length: a pointer to the first character. alloc_size can't represent "the allocated mem...
2012 May 25
4
[LLVMdev] alloc_size metadata
On 5/25/12 2:16 AM, Duncan Sands wrote: > Hi John, > >>>> I'm implementing the alloc_size function attribute in clang. >>> does anyone actually use this attribute? And if they do, can it >>> really buy >>> them anything? How about "implementing" it by ignoring it! >> > ... >> >> Currently, SAFECode has a pass which
2012 May 25
3
[LLVMdev] alloc_size metadata
...ut them feels klunky? > > basically it feels like "I only know about C, here's something that > pretends to be general but only handles C". Consider a language with > a string type that contains the string length as well as the > characters. It has a library function allocate_string(length). How > much does it allocate? length+4 bytes. That can't be represented by > alloc_size. What's more, it may well store the length at the start, > and return a pointer to just after the length: a pointer to the first > character. alloc_size can't represent &qu...
2012 May 29
0
[LLVMdev] alloc_size metadata
...y? >> >> basically it feels like "I only know about C, here's something that >> pretends to be general but only handles C". Consider a language with >> a string type that contains the string length as well as the >> characters. It has a library function allocate_string(length). How >> much does it allocate? length+4 bytes. That can't be represented by >> alloc_size. What's more, it may well store the length at the start, >> and return a pointer to just after the length: a pointer to the first >> character. alloc_size can'...
2012 May 29
1
[LLVMdev] alloc_size metadata
...;> basically it feels like "I only know about C, here's something that > >> pretends to be general but only handles C". Consider a language > >> with a string type that contains the string length as well as the > >> characters. It has a library function allocate_string(length). > >> How much does it allocate? length+4 bytes. That can't be > >> represented by alloc_size. What's more, it may well store the > >> length at the start, and return a pointer to just after the > >> length: a pointer to the first character....