The meaning of the c in calloc
The meaning of the c in calloc was vividly discussed in comp.lang.c in October 2000 (see here), with both clear (because, unlike malloc, calloc clears the memory it returns) and count (because, unlike malloc, calloc is passed a count of elements to allocate) suggested as possible explanations, however without real evidence for either. Other suggestions were (along with several less serious ones) contiguous, core, commit, chunk, and character, the latter because in early versions of K&R C, calloc was the only allocation function in the library (and had an accompanying cfree). For the same reason, it was even suggested that the c simply stand for the C programming language. So, the etymology of calloc still isn't proven, and if anybody has any definite evidence as to its meaning, I'd highly appreciate learning about it.
Ïà¹ØÎĵµ£º
Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸е쬻î»î»î£¡
&n ......
ǰÌìÍíÉÏÓöµ½Ò»Ì⣬±àд³ÌÐòÇó³ö×î´ó¹«ÒòÊý£¨×î´ó¹«Ô¼Êý£©£¬±¾ÄܵÄÎÒÏëÆðÀ´ÁËÊýѧÖÐÇó×î´ó¹«ÒòʽµÄ·½·¨£¬¿ÉÊÇÔÚ³ÌÐòʵ¼ùÉÏ
Ã÷ÏԵijöÁËÎÊÌ⣬Á½¸öÊýÒªÒ»¸öÒ»¸öµÄ½øÐвð½â£¬È»ºóÕÒµ½ÏàͬµÄ£¬Õâ¸ù±¾ÊÇÒ»ÌõËÀ·£¬Ë¼Ë÷Ò»Ò¹ÐÑÀ´£¬Í»È»±Å·¢Áé¸Ð£¬¿ÉÒÔ
ÓÃÁ½¸öÊý½øÐÐÈ¡ÓàÔËË㣬Èç¹ûÓàÊýΪÁãÔò×î´ó¹«ÒòÊýΪ±»³ýÊý£¬²»ÎªÁãÔòÓàÊýΪ×î ......
ÏÈ·¢±íÒ»ÏÂÓÞ¼û£¬»¶Ó´ó»ï¶ùÅÄש£º
Visual C++£ºWindowsƽ̨ÉÏ×îÁ÷ÐеıàÒëÆ÷£¬ºÍVS¼¯³ÉµÄºÜºÃ£¬±àÒëЧÂʺͱàÒëºóµÄ´úÂëЧÂʶ¼²»´í£¬µ«ÊÇ£¬³ýÁ˱ȽϺÃÓÃÖ®Í⣬ºÃÏóûÓÐÌØ±ðÍ»³öµÄ...¶øÇÒ£¬Ö§³ÖµÄÓ²¼þƽ̨ºÃÏóÖ»ÓÐX86µÄ...
GCC/G++£º¿ªÔ´µÄ£¬Linux/Unixƽ̨ÉϵÄÊ×Ñ¡£¬¶øÇÒÖ§³ÖNÖÐÓ²¼þƽ̨£¬Èç¹ûÏë½øÐÐ¿çÆ½Ì¨±àÒëµÄ»°£¬Õâ ......
Ô¤´¦Àí¹ý³ÌɨÃèÔ´´úÂ룬¶ÔÆä½øÐгõ²½µÄת»»£¬²úÉúеÄÔ´´úÂëÌṩ¸ø±àÒëÆ÷¡£¿É¼ûÔ¤´¦Àí¹ý³ÌÏÈÓÚ±àÒëÆ÷¶ÔÔ´´úÂë½øÐд¦Àí¡£
ÔÚCÓïÑÔÖУ¬²¢Ã»ÓÐÈκÎÄÚÔڵĻúÖÆÀ´Íê³ÉÈçÏÂһЩ¹¦ÄÜ£ºÔÚ±àÒëʱ°üº¬ÆäËûÔ´Îļþ¡¢¶¨Òåºê¡¢¸ù¾ÝÌõ¼þ¾ö¶¨±àÒëʱÊÇ·ñ°üº¬Ä³Ð©´úÂë¡£ÒªÍê³ÉÕâЩ¹¤×÷£¬¾ÍÐèҪʹÓÃÔ¤´¦Àí³ÌÐò¡£¾¡¹ÜÔÚĿǰ¾ø´ó¶àÊý±àÒëÆ÷¶¼°üº ......
¹ØÓÚcµÄ¶¯Ì¬ÄÚ´æ¹ÜÀíÒ»Ö±ÊǸö¾¾Ã²»Ë¥µÄ»°Ìâ,ÃæÊÔÒ²ÊÇ»ù±¾É϶¼»á¿¼µÄ,±¾À´¸Ð¾õÒѾÃ÷°×ÁË,µ«ÊǽñÌìʹÓõÄʱºòÒ»²»Ð¡Ðĵ¼Ö³ÌÐò±ÀÀ£ÁË,Òò´ËÉîÈëµÄÈ¥²éÁËÏÂ×ÊÁÏ,ÊÕ»ñ²»ÉÙ...Ìù³öÀ´Óë´ó¼Ò·ÖÏí...
ÏÈÌù¸ö´íÎó´úÂë:
int * ptr = (int *)mal ......