这是indexloc提供的服务,不要输入任何密码
Skip to content

@(init) tracking issue #5352

@Kelimion

Description

@Kelimion

As a general rule and strong preference, we would like @(init) procedures not to require the context.allocator or context.temp_allocator unless absolutely necessary. This is so that projects can be compiled using -default-to-nil-allocator (or -default-to-panic-allocator) to vouchsafe that any allocation occurs on custom allocators set up in main().

We will want to review any newly added use of @(init) and propose changes to avoid allocation where practical. Alternatives include using temporary stack buffers, adding sync.do_once to a procedure that expects something to be initialized, and so forth.

See for example:

Already reviewed:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions