{"record":{"id":"562a9ed1d6f6336a","repo":"oxc-project/oxc","slug":"insufficient-memory-to-create-fixed-size-allocator","errorCode":null,"errorMessage":"Insufficient memory to create fixed-size allocator pool","messagePattern":"Insufficient memory to create fixed-size allocator pool","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/oxc_allocator/src/pool/fixed_size.rs","lineNumber":170,"sourceCode":"\n        let mut allocators = Stack::with_capacity(capacity);\n\n        // Get as many allocators as possible, up to `capacity`\n        for i in 0..capacity {\n            // It's impossible to create more than `u32::MAX` allocators, as `u32::MAX` x 4 GiB allocations would\n            // consume almost the entirety of a 64-bit address space. No platform has such a large address space.\n            // Typically they use 48 bit address space, or 53 bit at most.\n            #[expect(clippy::cast_possible_truncation)]\n            let allocator = FixedSizeAllocator::try_new(i as u32);\n            let Ok(allocator) = allocator else { break };\n            allocators.push(allocator);\n        }\n\n        // Discard last allocator if we have more than 1.\n        // This leaves pool containing between 1 and `thread_count` allocators.\n        match allocators.len() {\n            // If we can't create even 1 allocator, panic\n            0 => panic!(\"Insufficient memory to create fixed-size allocator pool\"),\n            // If we only got 1, keep it.\n            // If system has just over 4 GiB memory available in total, OOM is possible later.\n            // But what else can we do in this case?\n            1 => {}\n            // Otherwise, discard the last allocator we got, to leave memory free for other allocations\n            _ => {\n                allocators.pop();\n            }\n        }\n\n        Self { allocators: Mutex::new(allocators), available: Condvar::new() }\n    }\n\n    /// Retrieve an [`Allocator`] from the pool.\n    ///\n    /// Linux/Mac implementation.\n    ///\n    /// # Panics","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_allocator/src/pool/fixed_size.rs#L152-L188","documentation":"Diagnostic from oxlint's vue/require-default-prop rule (crates/oxc_linter/src/rules/vue/require_default_prop.rs). Every prop that is not marked `required: true` must declare a `default`, in Options API `props` objects and in runtime `defineProps({...})` declarations. Optional props without a default resolve to `undefined`, pushing null-handling onto every consumer template. The rule knows Vue's native constructor types (String, Number, Boolean, Function, Object, Array, Symbol).","triggerScenarios":"Declaring `props: { title: { type: String } }` or `defineProps({ count: Number })` — the prop is optional (no `required: true`) yet has no `default` key. Adding `required: true` or a `default` entry silences the report.","commonSituations":"Converting required props to optional during refactor and forgetting the fallback; inconsistent optional-prop styles across a component library; TS codebases where optionality comes from the type signature but runtime object entries still need defaults.","solutions":["Add a `default` for the prop: `title: { type: String, default: '' }`.","If the prop must be provided, mark `required: true` instead of adding a default.","Remember Object/Array defaults must be factory functions: `default: () => []`.","If optional-without-default is an accepted team pattern, disable the rule or suppress it inline with a comment."],"exampleFix":"// before\nexport default {\n  props: { title: { type: String } }\n}\n\n// after\nexport default {\n  props: { title: { type: String, default: '' } }\n}","handlingStrategy":"validation","validationCode":"// validate a props definition before exporting the component\nfunction checkPropDefaults(defs) {\n  for (const [name, def] of Object.entries(defs)) {\n    const d = typeof def === 'object' && def !== null ? def : { type: def };\n    if (!d.required && !('default' in d)) {\n      throw new Error(`prop '${name}' needs required:true or a default`);\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Decide per prop: required OR defaulted — never neither.","Use factory functions for Array/Object defaults.","Keep prop contracts in one declaration place (defineProps or options) so tooling can check them."],"tags":["vue","oxlint","lint","props","default-value","defineprops"],"backgroundTag":"vue-prop-missing-default","analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}