search for: allocate_string

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

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 represe...
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 memory...
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 "...
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't...
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. al...