我正在寻找Linux内核的时间片(或量子)的值.
有没有/proc公开此类信息的文件?
(或)它在我的发行版的Linux头文件中是否定义良好?
(或者)是否有Linux API(可能是sysinfo)的C函数公开此值?
提前致谢.
考虑以下代码(使用GCC 4.7.4编译):
procedure Main is
procedure Sub_Proc(N : in out Integer) is
M : Integer;
begin
M := N;
end;
procedure Proc(N : out Integer) is
begin
Sub_Proc(N);
end;
N : Integer;
begin
Proc(N);
end Main;
Run Code Online (Sandbox Code Playgroud)
该程序Proc应该确保N作为out参数的参数永远不会在他的身体内被读出.但它将此参数传递给一个Sub_Proc带有in参数的过程,因此可能会在此过程中读取前一个参数,而调用过程则确保相反.
它是GCC错误还是Ada标准特异性?
请考虑以下代码:
My_Constant : constant := 2;
Run Code Online (Sandbox Code Playgroud)
"My_Constant"是变量还是C语言宏,它在内存中是否有存储?