*参照元 [#i3cd1117] #backlinks *説明 [#r1f1fc7b] -パス: [[linux-2.6.33/drivers/char/agp/generic.c]] -FIXME: これは何? --説明 **引数 [#x661948f] -unsigned long num_agp_pages -- **返り値 [#u869612a] -struct agp_memory * -- --[[linux-2.6.33/agp_memory]] **参考 [#zc3819f3] *実装 [#m7f8f0a8] static struct agp_memory *agp_create_user_memory(unsigned long num_agp_pages) { struct agp_memory *new; unsigned long alloc_size = num_agp_pages*sizeof(struct page *); - --[[linux-2.6.33/page]] new = kzalloc(sizeof(struct agp_memory), GFP_KERNEL); if (new == NULL) return NULL; - --[[linux-2.6.33/kzalloc()]] - --[[linux-2.6.33/GFP_KERNEL]] new->key = agp_get_key(); if (new->key < 0) { kfree(new); return NULL; } - --[[linux-2.6.33/agp_get_key()]] - --[[linux-2.6.33/kfree()]] agp_alloc_page_array(alloc_size, new); if (new->pages == NULL) { agp_free_key(new->key); kfree(new); return NULL; } new->num_scratch_pages = 0; return new; - --[[linux-2.6.33/agp_alloc_page_array()]] - --[[linux-2.6.33/agp_free_key()]] } *コメント [#bc0ff2bc]