ARM64 程序调用标准

ARM64 程序调用标准

  • 1 Machine Registers
    • 1.1 General-purpose Registers
    • 1.2 SIMD and Floating-Point Registers
  • 2 Processes, Memory and the Stack
    • 2.1 Memory Addresses
    • 2.2 The Stack
      • 2.2.1 Universal stack constraints
      • 2.2.2 Stack constraints at a public interface
    • 2.3 The Frame Pointer
  • 3 Subroutine Calls
    • 3.1 Use of IP0 and IP1 by the linker
  • 4 Parameter Passing
    • 4.1 Variadic Subroutines
    • 4.2 Parameter Passing Rules
  • 5 Result Return
  • 6 Interworking

The base standard defines a machine-level calling standard for the A64 instruction set. It assumes the availability of the vector registers for passing floating-point and SIMD arguments. Application code is expected to conform to one of the two defined major variants of it (SVR4-like or Windows-like).
基础标准定义了 A64 指令集的machine-level 调用标准。它假定了用于传递浮点和 SIMD 参数的矢量寄存器的可用性。应用代码应符合其两个主要变体(类 SVR4 或类 Windows)中的一个。
note:
SRV4: System V Revision 4. A variant of the Unix Operating System. Although this specification refers to SVR4, many other operating systems, such as Linux or BSD use similar rules.
SRV4:System V Revision 4。Unix 操作系统的一种变体。虽然本规范指的是 SVR4,但许多其他操作系统(如 Linux 或 BSD)也使用类似的规则。

1 Machine Registers

The ARM 64-bit architecture defines two mandatory register banks: a general-purpose register bank which can be used for scalar integer processing and pointer arithmetic; and a SIMD and Floating-Point register bank.
ARM 64 位体系结构定义了两个强制性寄存器组:一个通用寄存器组,可用于标量整数处理和指针运算;另一个 SIMD 和浮点寄存器组。

1.1 General-purpose Registers

There are thirty-one, 64-bit, general-purpose (integer) registers visible to the A64 instruction set; these are labeled r0-r30. In a 64-bit context these registers are normally referred to using the names x0-x30; in a 32-bit context the registers are specified by using w0-w30. Additionally, a stack-pointer register, SP, can be used with a restricted number of instructions. Register names may appear in assembly language in either upper case or lower case. In this specification upper case is used when the register has a fixed role in this procedure call standard. Table 2, General purpose registers and AAPCS64 usage summarizes the uses of the general-purpose registers in this standard. In addition to the general-purpose registers there is one status register (NZCV) that may be set and read by conforming code.
A64 指令集有 31 个 64 位通用(整数)寄存器,分别标为 r0-r30。在 64 位环境下,这些寄存器通常使用 x0-x30 的名称;在 32 位环境下,这些寄存器使用 w0-w30 的名称。此外,堆栈指针寄存器 SP 可用于数量有限的指令。寄存器名称在汇编语言中可以大写或小写出现。在本规范中,当寄存器在程序调用标准中具有固定作用时,则使用大写。表 2(通用寄存器和 AAPCS64 的使用)概述了本标准中通用寄存器的用途。除通用寄存器外,还有一个状态寄存器(NZCV)可由符合标准的代码设置和读取。
5
在这里插入图片描述
The first eight registers, r0-r7, are used to pass argument values into a subroutine and to return result values from a function. They may also be used to hold intermediate values within a routine (but, in general, only between subroutine calls).
前 8 个寄存器(r0-r7)用于向子程序传递参数值和从函数返回结果值。它们也可用于保存例程中的中间值(但一般只在子例程调用之间使用)。

Registers r16 (IP0) and r17 (IP1) may be used by a linker as a scratch register between a routine and any subroutine it calls (for details, see §3.1.1, Use of IP0 and IP1 by the linker). They can also be used within a routine to hold intermediate values between subroutine calls.
寄存器 r16(IP0)和 r17(IP1)可以被链接器用作例程和它调用的任何子例程之间的scratch寄存器(详见章节 3.1.1,链接器对 IP0 和 IP1 的使用)。它们也可以在例程中使用,在子程序调用之间保存中间值。
The role of register r18 is platform specific. If a platform ABI has need of a dedicated general purpose register to carry inter-procedural state (for example, the thread context) then it should use this register for that purpose. If the platform ABI has no such requirements, then it should use r18 as an additional temporary register. The platform ABI specification must document the usage for this register.
寄存器 r18 的作用与平台有关。如果平台 ABI 需要一个专用的通用寄存器来承载程序间状态(例如线程上下文),那么就应该使用该寄存器。如果平台 ABI 没有此类要求,则应使用 r18 作为额外的临时寄存器。平台 ABI 规范必须记录该寄存器的用途。
Note: Software developers creating platform-independent code are advised to avoid using r18 if at all possible. Most compilers provide a mechanism to prevent specific registers from being used for general allocation; portable hand-coded assembler should avoid it entirely. It should not be assumed that treating the register as callee-saved will be sufficient to satisfy the requirements of the platform. Virtualization code must, of course, treat the register as they would any other resource provided to the virtual machine.
: 建议创建平台独立代码的软件开发人员尽可能避免使用 r18。大多数编译器都提供了防止将特定寄存器用于通用分配的机制;可移植的手工编码汇编程序应完全避免使用 r18。不要以为将寄存器视为 “可保存的”(calle-saved)寄存器就能满足平台的要求。当然,虚拟化代码必须像对待提供给虚拟机的其他资源一样对待寄存器。
A subroutine invocation must preserve the contents of the registers r19-r29 and SP.
子程序调用必须保留寄存器 r19-r29 和 SP 的内容。
In all variants of the procedure call standard, registers r16, r17, r29 and r30 have special roles. In these roles they are labeled IP0, IP1, FP and LR when being used for holding addresses (that is, the special name implies accessing the register as a 64-bit entity).
在程序调用标准的所有变体中,寄存器 r16、r17、r29 和 r30 具有特殊作用。当寄存器用于保存地址时,它们被标记为 IP0、IP1、FP 和 LR(也就是说,特殊名称意味着将寄存器作为 64 位实体访问)。
Note: The special register names (IP0, IP1, FP and LR) should be used only in the context in which they are special. It is recommended that disassemblers always use the architectural names for the registers.
注意*: 特殊寄存器名称(IP0、IP1、FP 和 LR)只能在特殊情况下使用。建议反汇编程序始终使用寄存器的结构名称。
The NZCV register is a global condition flag register with the following properties:
NZCV 寄存器是全局条件标志寄存器,具有以下特性:

  • The N, Z, C and V flags are undefined on entry to and return from a public interface.
  • 在进入公共接口和从公共接口返回时,N、Z、C 和 V 标志都是未定义的。

1.2 SIMD and Floating-Point Registers

The ARM 64-bit architecture also has a further thirty-two registers, v0-v31, which can be used by SIMD and Floating-Point operations. The precise name of the register will change indicating the size of the access.
ARM 64 位架构还有另外 32 个寄存器 v0-v31,可供 SIMD 和浮点运算使用。寄存器的精确名称将发生变化,指示访问的大小。
Note Unlike in AArch32, in AArch64 the 128-bit and 64-bit views of a SIMD and Floating-Point register do no overlap multiple registers in a narrower view, so q1, d1 and s1 all refer to the same entry in the register bank.
注意 与 AArch32 不同,在 AArch64 中,SIMD 和浮点寄存器的 128 位和 64 位视图不会与较窄视图中的多个寄存器重叠,因此 q1、d1 和 s1 都指向寄存器库中的同一个条目。
The first eight registers, v0-v7, are used to pass argument values into a subroutine and to return result values from a function. They may also be used to hold intermediate values within a routine (but, in general, only between subroutine calls).
前 8 个寄存器(v0-v7)用于向子程序传递参数值和从函数返回结果值。这些寄存器还可用于保存例程中的中间值(但一般只在子例程调用之间使用)。
Registers v8-v15 must be preserved by a callee across subroutine calls; the remaining registers (v0-v7, v16-v31) do not need to be preserved (or should be preserved by the caller). Additionally, only the bottom 64-bits of each value stored in v8-v15 need to be preserved; it is the responsibility of the caller to preserve larger values.
子程序调用时,被调用者必须保留寄存器 v8-v15;其余寄存器(v0-v7、v16-v31)无需保留(或应由调用者保留)。此外,只有 v8-v15 中存储的每个值的底部 64 位才需要保留;调用者有责任保留更大的值。
The FPSR is a status register that holds the cumulative exception bits of the floating-point unit. It contains the fields IDC, IXC, UFC, OFC, DZC, IOC and QC. These fields are not preserved across a public interface and may have any value on entry to a subroutine.
FPSR 是一个状态寄存器,保存浮点单元的累积异常位。它包含字段IDC、IXC、UFC、OFC、DZC、IOC和QC。这些字段不会在公共接口中保留,并且在进入子例程时可能具有任何值。
The FPCR is used to control the behavior of the floating-point unit. It is a global register with the following properties.
FPCR 用于控制浮点运算单元的行为。它是一个全局寄存器,具有以下特性。
 The exception-control bits (8-12), rounding mode bits (22-23) and flush-to-zero bits (24) may be modified by calls to specific support functions that affect the global state of the application.
 异常控制位(8-12)、舍入模式位(22-23)和平移归零位(24)可通过调用特定的支持函数进行修改,从而影响应用程序的全局状态。
 All other bits are reserved and must not be modified. It is not defined whether the bits read as zero or one, or whether they are preserved across a public interface.
 所有其他位均为保留位,不得修改。至于这些位读作 0 还是 1,或者是否在公共接口上保留,目前还没有明确规定。

2 Processes, Memory and the Stack

The AAPCS64 applies to a single thread of execution or process (hereafter referred to as a process). A process has a program state defined by the underlying machine registers and the contents of the memory it can access. The memory a process can access, without causing a run-time fault, may vary during the execution of the process.
AAPCS64 适用于单线程执行或进程(以下简称进程)。进程的程序状态由底层机器寄存器及其可访问的内存内容定义。在进程执行过程中,在不导致运行时故障的情况下,进程可访问的内存可能会发生变化。
The memory of a process can normally be classified into five categories:
进程的内存通常可以分为五类:
 code (the program being executed), which must be readable, but need not be writable, by the process.
 代码(正在执行的程序),进程必须可以读取,但不一定可以写入。
 read-only static data.
 只读静态数据。
 writable static data.
 可写静态数据。
 the heap.
 堆
 the stack.
 栈
Writable static data may be further sub-divided into initialized, zero-initialized and uninitialized data. Except for the stack there is no requirement for each class of memory to occupy a single contiguous region of memory. A process must always have some code and a stack, but need not have any of the other categories of memory.
可写静态数据可以进一步细分为已初始化数据、零初始化数据和未初始化数据。除了栈之外,不需要每一类内存都占用单个连续的内存区域。进程必须始终具有一些代码和栈,但不需要任何其他类别的内存。
The heap is an area (or areas) of memory that are managed by the process itself (for example, with the C malloc function). It is typically used for the creation of dynamic data objects.
堆是由进程自身管理的内存区域(如使用 C 语言的 malloc 函数)。它通常用于创建动态数据对象。
A conforming program must only execute instructions that are in areas of memory designated to contain code.
符合要求的程序必须只执行指定包含代码的内存区域内的指令。

2.1 Memory Addresses

The address space may consist of one or more disjoint regions. No region may span address zero (although one region may start at zero).
地址空间可由一个或多个不相连的区域组成。任何区域都不得跨越零地址(尽管一个区域可以从零开始)。
The use of tagged addressing is platform specific. When tagged addressing is disabled all 64 bits of a pointer are passed to the address translation system. When tagged addressing is enabled, the top eight bits of a pointer are ignored for the purposes of address translation.
标记寻址的使用与平台有关。禁用标记寻址时,指针的所有 64 位都将传递给地址转换系统。启用标记寻址后,指针的前八位在地址转换时将被忽略。

2.2 The Stack

The stack is a contiguous area of memory that may be used for storage of local variables and for passing additional arguments to subroutines when there are insufficient argument registers available.
堆栈是一个连续的内存区域,可用于存储局部变量以及在没有足够的参数寄存器可用时将附加参数传递给子例程。
The stack implementation is full-descending, with the current extent of the stack held in the special-purpose register SP. The stack will, in general, have both a base and a limit though in practice an application may not be able to determine the value of either.
堆栈实现是全递减的,堆栈的当前范围保存在专用寄存器 SP 中。一般来说,堆栈将具有基数和限制,但实际上应用程序可能无法确定其中任何一个的值。
The stack may have a fixed size or be dynamically extendable (by adjusting the stack-limit downwards).
堆栈可以具有固定大小,也可以动态扩展(通过向下调整堆栈限制)。
The rules for maintenance of the stack are divided into two parts: a set of constraints that must be observed at all times, and an additional constraint that must be observed at a public interface.
堆栈的维护规则分为两部分:一组必须始终遵守的约束,以及必须在公共接口处遵守的附加约束。

2.2.1 Universal stack constraints

At all times the following basic constraints must hold:
任何时候都必须遵守以下基本约束:
 Stack-limit < SP <= stack-base. The stack pointer must lie within the extent of the stack.
 Stack-limit < SP <= stack-base。堆栈指针必须位于堆栈范围内。
 A process may only access (for reading or writing) the closed interval of the entire stack delimited by [SP, stack-base – 1].
 进程只能访问(用于读取或写入)由 [SP, stack-base – 1] 分隔的整个堆栈的闭区间。
Additionally, at any point at which memory is accessed via SP, the hardware requires that
此外,在访问内存的任何时候硬件都要求通过 SP 访问
 SP mod 16 = 0. The stack must be quad-word aligned.
 SP mod 16 = 0。堆栈必须四字对齐。

2.2.2 Stack constraints at a public interface

The stack must also conform to the following constraint at a public interface:
堆栈还必须在公共接口处符合以下约束:
 SP mod 16 = 0. The stack must be quad-word aligned.
 SP mod 16 = 0。堆栈必须四字对齐。

2.3 The Frame Pointer

Conforming code shall construct a linked list of stack-frames. Each frame shall link to the frame of its caller by means of a frame record of two 64-bit values on the stack. The frame record for the innermost frame (belonging to the most recent routine invocation) shall be pointed to by the Frame Pointer register (FP). The lowest addressed double-word shall point to the previous frame record and the highest addressed double-word shall contain the value passed in LR on entry to the current function. The end of the frame record chain is indicated by the address zero in the address for the previous frame. The location of the frame record within a stack frame is not specified. Note: There will always be a short period during construction or destruction of each frame record during which the frame pointer will point to the caller’s record.
合格的代码应构造堆栈帧的链接列表。每个帧应通过堆栈上两个 64 位值的帧记录链接到其调用者的帧。最里面的帧(属于最近的例程调用)的帧记录应由帧指针寄存器(FP)指向。最低寻址双字应指向前一帧记录,最高寻址双字应包含进入当前函数时在 LR 中传递的值。帧记录链的末尾由前一帧地址中的地址零指示。堆栈帧内帧记录的位置未指定。注意:在每个帧记录的构造或销毁过程中总会有一个短暂的时间段,在此期间帧指针将指向调用者的记录。
A platform shall mandate the minimum level of conformance with respect to the maintenance of frame records.
平台应强制规定帧记录维护的最低一致性水平。
The options are, in decreasing level of functionality:
这些选项按功能级别递减:
 It may require the frame pointer to address a valid frame record at all times, except that small subroutines which do not modify the link register may elect not to create a frame record
 它可能需要帧指针始终寻址有效的帧记录,但不修改链接寄存器的小子例程可能选择不创建帧记录
 It may require the frame pointer to address a valid frame record at all times, except that any subroutine may elect not to create a frame record
 它可能需要帧指针始终寻址有效的帧记录,但任何子例程可能选择不创建帧记录
 It may permit the frame pointer register to be used as a general-purpose callee-saved register, but provide a platform-specific mechanism for external agents to reliably detect this condition
 它可以允许帧指针寄存器用作通用被调用者保存的寄存器,但为外部代理提供特定于平台的机制来可靠地检测这种情况
 It may elect not to maintain a frame chain and to use the frame pointer register as a general-purpose callee-saved register.
 它可以选择不维护帧链并使用帧指针寄存器作为通用被调用者保存的寄存器。

3 Subroutine Calls

The A64 instruction set contains primitive subroutine call instructions, BL and BLR, which performs a branch-with-link operation. The effect of executing BL is to transfer the sequentially next value of the program counter—the return address—into the link register (LR) and the destination address into the program counter. The effect of executing BLR is similar except that the new PC value is read from the specified register.
A64指令集包含原始子程序调用指令BL和BLR,它们执行带链接的分支操作。执行BL的效果是将程序计数器的下一个值(返回地址)传送到链接寄存器(LR),并将目标地址传送到程序计数器。执行BLR 的效果类似,只是从指定寄存器中读取新的PC 值。
在这里插入图片描述

3.1 Use of IP0 and IP1 by the linker

The A64 branch instructions are unable to reach every destination in the address space, so it may be necessary for the linker to insert a veneer between a calling routine and a called subroutine. Veneers may also be needed to support dynamic linking. Any veneer inserted must preserve the contents of all registers except IP0, IP1 (r16, r17) and the condition code flags; a conforming program must assume that a veneer that alters IP0 and/or IP1 may be inserted at any branch instruction that is exposed to a relocation that supports long branches.
A64 分支指令无法到达地址空间中的每个目的地,因此链接器可能需要在调用例程和被调用子例程之间插入veneer代码。还可能需要veneer来支持动态链接。插入的任何veneer必须保留除 IP0、IP1(r16、r17)和条件代码标志之外的所有寄存器的内容;符合要求的程序必须假设可以将更改 IP0 和/或 IP1 的veneer代码插入到支持长分支的重定位的任何分支指令处。
Note R_AARCH64_CALL26, and R_AARCH64_JUMP26 are the ELF relocation types with this property.
注意 R_AARCH64_CALL26 和 R_AARCH64_JUMP26 是具有此属性的 ELF 重定位类型。

4 Parameter Passing

The base standard provides for passing arguments in general-purpose registers (r0-r7), SIMD/floating-point registers (v0-v7) and on the stack. For subroutines that take a small number of small parameters, only registers are used.
基本标准规定在通用寄存器 (r0-r7)、SIMD/浮点寄存器 (v0-v7) 和堆栈中传递参数。对于采用少量小参数的子程序,仅使用寄存器。
在这里插入图片描述

4.1 Variadic Subroutines

A Variadic subroutine is a routine that takes a variable number of parameters. The full parameter list is known by the caller, but the callee only knows a minimum number of arguments will be passed and will determine the additional arguments based on the values passed in other arguments. The two classes of arguments are known as Named arguments (these form the minimum set) and Anonymous arguments (these are the optional additional arguments).
变量子例程是一种接受可变数参数的例程。调用者知道完整的参数列表,但被调用者只知道将传递的最小参数数,并将根据其他参数中传递的值确定附加参数。这两类参数被称为命名参数(构成最小参数集)和匿名参数(可选的附加参数)。
In this standard a non-variadic subroutine can be considered to be identical to a variadic subroutine that takes no optional arguments.
在本标准中,非变量子程序可视为与不带可选参数的变量子程序相同。

4.2 Parameter Passing Rules

Parameter passing is defined as a two-level conceptual model
参数传递被定义为两个层次的概念模型
 A mapping from the type of a source language argument onto a machine type
 从源语言参数类型到机器类型的映射
 The marshaling of machine types to produce the final parameter list
 对机器类型进行调整,以生成最终参数列表
The mapping from a source language type onto a machine type is specific for each language and is described separately. The result is an ordered list of arguments that are to be passed to the subroutine.
从源语言类型到机器类型的映射是每种语言所特有的,将分别进行描述。结果是要传递给子程序的参数的有序列表。
For a caller, sufficient stack space to hold stacked argument values is assumed to have been allocated prior to marshaling: in practice the amount of stack space required cannot be known until after the argument marshaling has been completed. A callee is permitted to modify any stack space used for receiving parameter values from the caller.
对于调用方而言,假定在堆叠参数之前已经分配了足够的堆栈空间来存放堆叠参数值:实际上,只有在参数堆叠完成后才能知道所需的堆栈空间。允许被调用者修改用于接收调用者参数值的栈空间

5 Result Return

The manner in which a result is returned from a function is determined by the type of that result:
函数返回结果的方式由结果的类型决定:
 If the type, T, of the result of a function is such that
 如果类型 是T,函数将会是这样的

void func(T arg)

would require that arg be passed as a value in a register (or set of registers) according to the rules in §4 Parameter Passing, then the result is returned in the same registers as would be used for such an argument.
将要求 arg 按照第 4 节参数传递中的规则,以寄存器(或寄存器组)中的值的形式传递,然后结果将以用于此类参数的相同寄存器返回。
 Otherwise, the caller shall reserve a block of memory of sufficient size and alignment to hold the result. The address of the memory block shall be passed as an additional argument to the function in x8. The callee may modify the result memory block at any point during the execution of the subroutine (there is no requirement for the callee to preserve the value stored in x8).
否则,调用者应预留足够大小和对齐方式的内存块来保存结果。内存块的地址应作为附加参数传递给 x8 中的函数。被调用者可在执行子程序的任何时候修改结果内存块(不要求调用者保留 x8 中存储的值)。

6 Interworking

Interworking between the 32-bit AAPCS and the AAPCS64 is not supported within a single process. (In AArch64, all inter-operation between 32-bit and 64-bit machine states takes place across a change of exception level).
单个进程内不支持 32 位 AAPCS 和 AAPCS64 之间的互操作。(在 AArch64 中,32 位和 64 位机器状态之间的所有互操作都是在异常级别发生变化时进行的)。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/79260.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【Leetcode】98. 验证二叉搜索树

一、题目 1、题目描述 给你一个二叉树的根节点 root ,判断其是否是一个有效的二叉搜索树。 有效 二叉搜索树定义如下: 节点的左子树只包含 小于 当前节点的数。节点的右子树只包含 大于 当前节点的数。所有左子树和右子树自身必须也是二叉搜索树。示例1: 输入:root = …

Nevron 3DChart Crack,可视化界面在运行时可用

Nevron 3DChart Crack,可视化界面在运行时可用 3DChart使用OpenGL 3D图形引擎创建复杂的2D和3D图表&#xff0c;这些图表可以包含静态或动画图像。3DChart包括一个用于生成图表模板的独立应用程序和一个ASP服务器配置实用程序。该组件还包括一个专门设计用于与3DChart集成的工具…

阿里云服务器安装部署Docker使用教程

本文阿里云百科分享如何在云服务ECS实例上&#xff0c;部署并使用Docker。Docker是一款开源的应用容器引擎&#xff0c;具有可移植性、可扩展性、高安全性和可管理性等优势。开发者可将应用程序和依赖项打包到一个可移植的容器中&#xff0c;快速发布到Linux机器上并实现虚拟化…

每日汇评:黄金在 200 日移动平均线附近似乎很脆弱,关注美国零售销售

1、金价预计将巩固其近期跌势&#xff0c;至 6 月初以来的最低水平&#xff1b; 2、对美联储再次加息的押注继续限制了贵金属的上涨&#xff1b; 3、金融市场现在期待美国零售销售报告带来一些有意义的推动&#xff1b; 周二金价难以获得任何有意义的牵引力&#xff0c;并在…

OpenCV-Python中的图像处理-GrabCut算法交互式前景提取

OpenCV-Python中的图像处理-GrabCut算法交互式前景提取 Python-OpenCV中的图像处理-GrabCut算法交互式前景提取 Python-OpenCV中的图像处理-GrabCut算法交互式前景提取 cv2.grabCut(img: Mat, mask: typing.Optional[Mat], rect, bgdModel, fgdModel, iterCount, mode…) img…

2011年下半年 软件设计师 上午试卷2

博主介绍&#xff1a;✌全网粉丝3W&#xff0c;全栈开发工程师&#xff0c;从事多年软件开发&#xff0c;在大厂呆过。持有软件中级、六级等证书。可提供微服务项目搭建与毕业项目实战&#xff0c;博主也曾写过优秀论文&#xff0c;查重率极低&#xff0c;在这方面有丰富的经验…

Nginx搭建本地服务器,无需购买服务器即可测试vue项目打包后的效果

一.前言 本文是在windows环境&#xff08;Linux环境下其实也大同小异&#xff09;下基于Nginx实现搭建本地服务器&#xff0c;手把手教你部署vue项目。 二.Nginx入门 1&#xff09;下载安装 进入Nginx官网下载&#xff0c;选择stable版本下的windows版本下载即可 2&#xff09;…

docker-compose redis 一直启动失败

环境&#xff1a; centos 8.x 背景 使用docker-compose 来启动redis docker-compose.yml 如下&#xff1a; version: 3.3 services:redis:image: redis:latestrestart: alwayscontainer_name: redisports:- 6379:6379volumes:- ./data:/redis/data- ./redis.conf:/redis/re…

【C++】set/multiset容器

1.set基本概念 #include <iostream> using namespace std;//set容器构造和赋值 #include<set>//遍历 void printSet(const set<int>& st) {for (set<int>::const_iterator it st.begin(); it ! st.end(); it){cout << *it << " …

五分钟搭建生鲜蔬果小程序

如今&#xff0c;随着移动互联网的快速发展&#xff0c;小程序已经成为众多企业和商家推广产品和服务的重要工具。而生鲜蔬果行业作为一个常见的消费领域&#xff0c;也开始逐渐转向小程序商城来进行销售和服务。那么&#xff0c;如何从零开始搭建一个生鲜蔬果小程序商城呢&…

通过TightVNC远程访问MacOS

目录 一、下载 TightVNC 下载链接&#xff1a;https://www.tightvnc.com/ 下载后按步骤进行安装&#xff0c;安装完成后安装目录如下&#xff1a; 运行 tvnviewer.exe&#xff0c;输入远程 IP&#xff0c;点击【connect】&#xff1a; 输入密码&#xff0c;点击【OK】后即可远…

基于SpringBoot+Thymeleaf仓库管理系统

✌全网粉丝20W,csdn特邀作者、博客专家、CSDN新星计划导师、java领域优质创作者,博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ &#x1f345;文末获取项目下载方式&#x1f345; 一、项目背景介绍&#xff1a; 随着信息技术的快速发…

02.FFMPEG的安装和添加硬件加速自编译

说一个极其郁闷的事情&#xff0c;就在昨天收到3399的一块板子后&#xff0c;往电脑上面一插&#xff0c;然后悲剧的事情就发生了&#xff0c;我的电脑蓝屏重启了&#xff0c;这下好了&#xff0c;我写到一半的帖子也不见了&#xff0c;我的SSH里面的记录全部消失了&#xff0c…

2023年03月 C/C++(二级)真题解析#中国电子学会#全国青少年软件编程等级考试

第1题&#xff1a;数字字符求和 请编写一个程序实现以下功能&#xff1a;从一个字符串中&#xff0c;提取出所有的数字字符即0-9&#xff0c;并作为数求和。 时间限制&#xff1a;1000 内存限制&#xff1a;65536 输入 一行字符串&#xff0c;长度不超过100&#xff0c;字符串中…

算法通关村第十关 | 数组中第k个最大元素

1.数组中第k大的数字 题目&#xff1a; LeetCode&#xff1a;数组中的第k个最大元素&#xff0c;给定整数数组nums和整数k&#xff0c;请返回数组中第k个最大的元素&#xff0c;请注意&#xff0c;你需要找的是数组排序后第k个最大的元素&#xff0c;而不是第k个不同的元素。 运…

springBoot是如何实现自动装配的

目录 1 什么是自动装配 2 Spring自动装配原理 2.1 SpringBootConfiguration ​编辑 2.2 EnableAutoConfiguration 2.2.1 AutoConfigurationPackage 2.2.2 Import({AutoConfigurationImportSelector.class}) 2.3 ComponentScan 1 什么是自动装配 自动装配就是将官方写好的的…

企业数据库遭到360后缀勒索病毒攻击,360勒索病毒解密

在当今数字化时代&#xff0c;企业的数据安全变得尤为重要。随着数字化办公的推进&#xff0c;企业的生产运行效率得到了很大提升&#xff0c;然而针对网络安全威胁&#xff0c;企业也开始慢慢引起重视。近期&#xff0c;我们收到很多企业的求助&#xff0c;企业的服务器遭到了…

Node.js学习笔记-04

这第九章也是个大重点 九、玩转进程 Node在选型时决定在V8引擎之上构建&#xff0c;也就意味着它的模型与浏览器类似。 本章关于进程的介绍和讨论将会解决如下两个问题&#xff1a; 单进程单线程并非完美&#xff0c;如今CPU基本均是多核的&#xff0c;真正的服务器&#xf…

如何使用CSS实现一个平滑过渡效果?

聚沙成塔每天进步一点点 ⭐ 专栏简介⭐ 使用CSS实现平滑过渡效果⭐ 写在最后 ⭐ 专栏简介 前端入门之旅&#xff1a;探索Web开发的奇妙世界 记得点击上方或者右侧链接订阅本专栏哦 几何带你启航前端之旅 欢迎来到前端入门之旅&#xff01;这个专栏是为那些对Web开发感兴趣、刚…

如遭遇DDoS等攻击会对企业和个人造成严重影响,包括以下

1. 服务不可用&#xff1a;正常用户无法访问目标服务器&#xff0c;导致业务中断&#xff0c;影响用户体验。 2. 数据泄露&#xff1a;攻击者可能会在攻击过程中窃取用户数据&#xff0c;导致隐私泄露和财产损失。 3. 经济损失&#xff1a;由于服务中断&#xff0c;企业可能遭受…