{"id":6454,"date":"2019-03-02T22:49:32","date_gmt":"2019-03-02T13:49:32","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=6454"},"modified":"2023-05-27T18:31:09","modified_gmt":"2023-05-27T09:31:09","slug":"%e3%80%90c%e8%a8%80%e8%aa%9e%e3%80%91%e3%83%a1%e3%83%a2%e3%83%aa%e3%82%92%e6%89%b1%e3%81%86%e9%96%a2%e6%95%b0","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=6454","title":{"rendered":"\u3010C\u8a00\u8a9e\u3011\u30e1\u30e2\u30ea\u306e\u57fa\u672c\u3001\u30e1\u30e2\u30ea\u3092\u6271\u3046\u95a2\u6570"},"content":{"rendered":"<h2>\u30e1\u30e2\u30ea\u3068\u306f\uff1f<\/h2>\n<p>\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u5185\u90e8\u3067\u60c5\u5831\u8a18\u61b6\u3092\u62c5\u5f53\u3059\u308b<span style=\"color: #ff0000;\"><strong>IC\u30c1\u30c3\u30d7<\/strong><\/span>\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>8GB\u300116GB\u7b49\u88fd\u54c1\u306b\u3088\u3063\u3066\u8a18\u61b6\u5bb9\u91cf\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>1\u3064\u306e\u30de\u30b9\u306b1\u30d0\u30a4\u30c8\u306e\u60c5\u5831\u3092\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u3001\u5148\u982d\u30920\u3068\u3057\u3066\u4f55\u756a\u76ee\u306e\u5834\u6240\u3067\u3042\u308b\u304b\u3092\u6307\u5b9a\u3057\u3066\u60c5\u5831\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<h3>\u3069\u308c\u304f\u3089\u3044\u306e\u30de\u30b9\u76ee\u304c\u3042\u308b\u306e\uff1f<\/h3>\n<p>16GB\u306e\u30e1\u30e2\u30ea\u306e\u5834\u5408\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u7d041600\u5104\u500b<\/strong><\/span>\u306e\u30de\u30b9\u76ee\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u8a18\u8ff0\u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea\u306e\u52d5\u4f5c<\/h3>\n<table>\n<tbody>\n<tr>\n<th>\u8a18\u8ff0<\/th>\n<th>\u30e1\u30e2\u30ea\u306e\u6319\u52d5<\/th>\n<\/tr>\n<tr>\n<td>\u5909\u6570\u5ba3\u8a00<\/td>\n<td>\u30e1\u30e2\u30ea\u9818\u57df\u3092\u78ba\u4fdd\u3059\u308b\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u5909\u6570\u306b\u4ee3\u5165<\/td>\n<td>\u30e1\u30e2\u30ea\u9818\u57df\u306e\u5024\u3092\u66f8\u304d\u8fbc\u3080\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u5909\u6570\u304b\u3089\u5024\u3092\u53d6\u5f97<\/td>\n<td>\u30e1\u30e2\u30ea\u304b\u3089\u60c5\u5831\u3092\u8aad\u307f\u51fa\u3059\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u30e1\u30e2\u30ea\u306e\u5404\u9818\u57df<\/h3>\n<table>\n<tbody>\n<tr>\n<th width=\"100\">\u9818\u57df\u540d<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<tr>\n<td>\u30b9\u30bf\u30c3\u30af\u9818\u57df<\/td>\n<td>\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u306e\u5909\u6570\u3001\u914d\u5217\u3001\u5f15\u6570\u3001\u623b\u308a\u5024\u7b49\u3092\u683c\u7d0d\u3059\u308b\u9818\u57df\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u300c\u95a2\u6570\u304c\u4f7f\u3046\u4e00\u6642\u7684\u306a\u30c7\u30fc\u30bf\u7f6e\u304d\u5834\u300d<\/strong><\/span>\u3068\u3044\u3046\u610f\u5473\u5408\u3044\u304c\u3042\u308a\u3001\u5c0f\u3055\u306a\u5bb9\u91cf\u3057\u304b\u6e96\u5099\u3055\u308c\u306a\u3044\u306e\u3067\u3001\u914d\u5217\u7b49\u306f\u57fa\u672c\u7684\u306b\u306f\u5927\u304d\u306a\u5bb9\u91cf\u3092\u78ba\u4fdd\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u30d2\u30fc\u30d7\u9818\u57df<\/td>\n<td>\u30e1\u30e2\u30ea\u5236\u5fa1\u547d\u4ee4\u3092\u4f7f\u3046\u3068\u304d\u306b\u5229\u7528\u3055\u308c\u308b\u9818\u57df\u3067\u3059\u3002<\/td>\n<\/tr>\n<tr>\n<td>\u9759\u7684\u9818\u57df<\/td>\n<td>\u5185\u5bb9\u304c\u5909\u308f\u3089\u306a\u3044\u5b9a\u6570\u3001\u30ea\u30c6\u30e9\u30eb\u60c5\u5831\u3001static\u304c\u3064\u3051\u3089\u308c\u305f\u7279\u6b8a\u5909\u6570\u3092\u683c\u7d0d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>\u30e1\u30e2\u30ea\u95a2\u9023\u95a2\u6570<\/h2>\n<p>C\u8a00\u8a9e\u3067\u306f\u3001\u30e1\u30e2\u30ea\u30a2\u30af\u30bb\u30b9\u306b\u95a2\u9023\u3057\u305f\u3088\u304f\u51fa\u308b\u95a2\u6570\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3044\u305a\u308c\u3082<span style=\"color: #ff0000;\"><strong>\u300c#include&lt;string.h&gt;\u300d<\/strong><\/span>\u3068\u3044\u3046\u6a19\u6e96\u306e\u30d8\u30c3\u30c0\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>memcpy<\/h3>\n<p>\u914d\u5217\u7b49\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u5225\u306e\u30e1\u30e2\u30ea\u9818\u57df\u306b\u4e38\u3005\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>\u69cb\u6587<\/h4>\n<pre class=\"lang:default decode:true\">void* memcpy(void* \u30b3\u30d4\u30fc\u5148\u30a2\u30c9\u30ec\u30b9,const void* \u30b3\u30d4\u30fc\u5143\u30a2\u30c9\u30ec\u30b9,size_t \u30b3\u30d4\u30fc\u3059\u308b\u30d0\u30a4\u30c8\u6570);<\/pre>\n<h4>\u6ce8\u610f\u70b9<\/h4>\n<p>\u3053\u306e\u95a2\u6570\u306f<span style=\"color: #ff0000;\"><strong>\u300c\u6d45\u3044\u30b3\u30d4\u30fc\uff08shallow copy\uff09\u300d<\/strong><\/span>\u3092\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u70b9\u3067\u3059\u3002<\/p>\n<p>\u69cb\u9020\u4f53\u3084\u3001\u914d\u5217\u81ea\u4f53\u306e\u30a2\u30c9\u30ec\u30b9\u9818\u57df\u306f\u4e38\u3005\u30b3\u30d4\u30fc\u3057\u307e\u3059\u304c\u3001\u3082\u3057\u69cb\u9020\u4f53\u3084\u914d\u5217\u306e\u4e2d\u306b\u30dd\u30a4\u30f3\u30bf\u578b\u306e\u30e1\u30f3\u30d0\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u542b\u307e\u308c\u3066\u3044\u308b\u69cb\u9020\u81ea\u4f53\u306f\u30b3\u30d4\u30fc\u3092\u3057\u307e\u305b\u3093\u3002<\/p>\n<h3>memcmp<\/h3>\n<p>\u30e1\u30e2\u30ea\u9818\u57df\u540c\u58eb\u304c\u5408\u81f4\u3057\u3066\u3044\u308b\u304b\u6bd4\u8f03\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u901a\u5e38\u306e\u914d\u5217\u3067\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u300c\u3042\u308b\u30e1\u30e2\u30ea\u9818\u57df\u3068\u5225\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u76f4\u63a5\u30a4\u30b3\u30fc\u30eb\u6f14\u7b97\u5b50\u3067\u6bd4\u8f03\u300d\u306f\u3067\u304d\u306a\u3044<\/strong><\/span>\u306e\u3067\u3001\u305d\u308c\u3092\u5b9f\u73fe\u3057\u305f\u3044\u5834\u5408\u306f\u3053\u308c\u3092\u4f7f\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>memset<\/h3>\n<p>\u30e1\u30e2\u30ea\u9818\u57df\u3092\u7279\u5b9a\u306e\u60c5\u5831\uff080\u7b49\uff09\u3067\u57cb\u3081\u308b\uff08\u521d\u671f\u5316\u3059\u308b\uff09\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u914d\u5217\u7b49\u3067\u4f7f\u7528\u3059\u308b\u30e1\u30e2\u30ea\u9818\u57df\u3092\u8a00\u8449\u901a\u308a<span style=\"color: #ff0000;\"><strong>\u521d\u671f\u5316\u3057\u305f\u3044\u5834\u5408<\/strong><\/span>\u306b\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h3>malloc<\/h3>\n<p>\u30d2\u30fc\u30d7\u9818\u57df\u306b\u9023\u7d9a\u3057\u305f\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3057\u307e\u3059\u3002<\/p>\n<h4>\u69cb\u6587<\/h4>\n<pre class=\"lang:default decode:true\">void* malloc(\u30b5\u30a4\u30ba);<\/pre>\n<p>\u901a\u5e38\u306e\u914d\u5217\u3067\u3042\u308c\u3070\u3001\u30e1\u30e2\u30ea\u306e\u30b9\u30bf\u30c3\u30af\u9818\u57df\u306b\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u95a2\u6570\u304c\u7d42\u308f\u308b\u3068\u89e3\u653e\u3055\u308c\u3066\u4f7f\u3048\u307e\u305b\u3093\u304c\u3001malloc\u3092\u4f7f\u3046\u3068\u30d2\u30fc\u30d7\u9818\u57df\u306b\u78ba\u4fdd\u3055\u308c\u308b\u306e\u3067\u81ea\u52d5\u958b\u653e\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>free\u95a2\u6570<\/strong><\/span>\u3092\u4f7f\u3063\u3066\u3001\u30d7\u30ed\u30b0\u30e9\u30de\u304c\u30e1\u30e2\u30ea\u3092\u624b\u52d5\u3067\u89e3\u653e\u3057\u3066\u3042\u3052\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<span style=\"color: #ff0000;\"><strong>\u3082\u3057\u3001\u89e3\u653e\u3057\u306a\u3051\u308c\u3070\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u304c\u767a\u751f\u3057\u3066\u3001PC\u5185\u306e\u30e1\u30e2\u30ea\u3092\u98df\u3044\u3064\u3076\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/strong><\/span><\/p>\n<h3>free<\/h3>\n<p>malloc\u3067\u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u9818\u57df\u3092\u624b\u52d5\u3067\u89e3\u653e\u3057\u307e\u3059\u3002<\/p>\n<h4>\u69cb\u6587<\/h4>\n<pre class=\"lang:default decode:true\">void free(void* \u5909\u6570\u540d);<\/pre>\n<h3>calloc<\/h3>\n<p>malloc\u306b\u4f3c\u3066\u3044\u308b\u304c\u9055\u3046\u70b9\u3068\u3057\u3066\u306f\u3001<span style=\"color: #ff0000;\"><strong>\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3057\u305f\u76f4\u5f8c\u306b\u5185\u5bb9\u30920\u3067\u57cb\u3081\u3066\u3057\u307e\u3046\u70b9<\/strong><\/span>\u3002<\/p>\n<p>malloc\u5f8c\u306bmemset\u30670\u3067\u521d\u671f\u5316\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u51e6\u7406\u304c\u3042\u308c\u3070\u3001\u3053\u3061\u3089\u306e\u65b9\u304c\u30b9\u30de\u30fc\u30c8\u306a\u306e\u3067\u3001\u3053\u3061\u3089\u3092\u4f7f\u3046\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u30e1\u30e2\u30ea\u3068\u306f\uff1f \u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u5185\u90e8\u3067\u60c5\u5831\u8a18\u61b6\u3092\u62c5\u5f53\u3059\u308bIC\u30c1\u30c3\u30d7\u306e\u3053\u3068\u3067\u3059\u3002 8GB\u300116GB\u7b49\u88fd\u54c1\u306b\u3088\u3063\u3066\u8a18\u61b6\u5bb9\u91cf\u304c\u7570\u306a\u308a\u307e\u3059\u3002 1\u3064\u306e\u30de\u30b9\u306b1\u30d0\u30a4\u30c8\u306e\u60c5\u5831\u3092\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u3001\u5148\u982d\u30920\u3068\u3057\u3066\u4f55\u756a\u76ee\u306e\u5834\u6240\u3067\u3042\u308b\u304b\u3092\u6307\u5b9a\u3057\u3066 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[74],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/6454"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6454"}],"version-history":[{"count":14,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/6454\/revisions"}],"predecessor-version":[{"id":20149,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/6454\/revisions\/20149"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6454"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}