Object-oriented Design Patterns in the Kernel, Part 2
面向對象內核設計模式,第二部分
posted by Elv13 on Mon 27th Jun 2011 14:17 UTC
發表於:2011年6月27日 北京時間22:17
"In the first part of this analysis we looked at how the polymorphic side of object-oriented programming was implemented in the Linux kernel using regular C constructs. In particular we examined method dispatch, looked at the different forms that vtables could take, and the circumstances where separate vtables were eschewed in preference for storing function pointers directly in objects. In this conclusion we will explore a second important aspect of object-oriented programming - inheritance, and in particular data inheritance."
「在該分析(面向對象內核設計模式專題)的
第一部分,咱們看到了如何使用普通C結構體,在Linux內核實現面向對象編程的多態方面。特別地,咱們考察了方法調度,查看了虛函數表能夠存在的不一樣形式,以及爲直接在對象內存儲函數指針,單獨的虛函數表被規避的情形。在
第二部分(推論部分),咱們將探索另一個面向對象編程重要的方面——繼承,特別是數據繼承。」
注:《面向對象內核設計模式》兩部份內容(英文版)見
附件。